@@ -952,6 +952,8 @@ func TestTermVariables(t *testing.T) {
952
952
func TestOp (t * testing.T ) {
953
953
t .Run ("insert" , func (t * testing.T ) {
954
954
t .Run ("atom" , func (t * testing.T ) {
955
+ varCounter = 1
956
+
955
957
vm := VM {_operators : newOperators ()}
956
958
vm .getOperators ().define (900 , operatorSpecifierXFX , NewAtom (`+++` ))
957
959
vm .getOperators ().define (1100 , operatorSpecifierXFX , NewAtom (`+` ))
@@ -973,21 +975,21 @@ func TestOp(t *testing.T) {
973
975
},
974
976
}},
975
977
orderedmap.Pair [Atom , [_operatorClassLen ]operator ]{
976
- Key : NewAtom (`++ ` ),
978
+ Key : NewAtom (`+` ),
977
979
Value : [_operatorClassLen ]operator {
978
980
operatorClassInfix : {
979
- priority : 1000 ,
981
+ priority : 1100 ,
980
982
specifier : operatorSpecifierXFX ,
981
- name : NewAtom ( "++" ) ,
983
+ name : atomPlus ,
982
984
},
983
985
}},
984
986
orderedmap.Pair [Atom , [_operatorClassLen ]operator ]{
985
- Key : NewAtom (`+` ),
987
+ Key : NewAtom (`++ ` ),
986
988
Value : [_operatorClassLen ]operator {
987
989
operatorClassInfix : {
988
- priority : 1100 ,
990
+ priority : 1000 ,
989
991
specifier : operatorSpecifierXFX ,
990
- name : atomPlus ,
992
+ name : NewAtom ( "++" ) ,
991
993
},
992
994
}}))}, vm .getOperators ())
993
995
})
@@ -1033,21 +1035,21 @@ func TestOp(t *testing.T) {
1033
1035
},
1034
1036
}},
1035
1037
orderedmap.Pair [Atom , [_operatorClassLen ]operator ]{
1036
- Key : NewAtom (`++ ` ),
1038
+ Key : NewAtom (`+` ),
1037
1039
Value : [_operatorClassLen ]operator {
1038
1040
operatorClassInfix : {
1039
- priority : 1000 ,
1041
+ priority : 1100 ,
1040
1042
specifier : operatorSpecifierXFX ,
1041
- name : NewAtom ( "++" ) ,
1043
+ name : atomPlus ,
1042
1044
},
1043
1045
}},
1044
1046
orderedmap.Pair [Atom , [_operatorClassLen ]operator ]{
1045
- Key : NewAtom (`+` ),
1047
+ Key : NewAtom (`++ ` ),
1046
1048
Value : [_operatorClassLen ]operator {
1047
1049
operatorClassInfix : {
1048
- priority : 1100 ,
1050
+ priority : 1000 ,
1049
1051
specifier : operatorSpecifierXFX ,
1050
- name : atomPlus ,
1052
+ name : NewAtom ( "++" ) ,
1051
1053
},
1052
1054
}}))}, vm .getOperators ())
1053
1055
})
0 commit comments