File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,14 @@ func TestPlusOperatorDetector(t *testing.T) {
30
30
if i .contains ("+" ) != true {
31
31
t .Error ("dovrebbe conoscere l'operatore +" )
32
32
}
33
+ }
34
+
35
+ func TestShouldNotContainUnknownOperator (t * testing.T ) {
36
+ sentence := "2 + 3"
37
+ i := interpreter {}
38
+ i .of (sentence )
33
39
if i .contains ("unknown" ) != false {
34
- t .Error ("non dovrebbe conoscere un operatore sconosciuto " )
40
+ t .Error ("it should not known unknown operator " )
35
41
}
36
42
}
37
43
@@ -43,7 +49,7 @@ func TestSplitSentencesInSplice(t *testing.T) {
43
49
for ind , _ := range expected {
44
50
tok := i .tokens ()
45
51
if expected [ind ] != tok [ind ] {
46
- t .Error ("non ci siamo " )
52
+ t .Error ("invalid tokens " )
47
53
}
48
54
}
49
55
}
@@ -61,7 +67,7 @@ func TestCountNumberOfOperators(t *testing.T) {
61
67
}
62
68
}
63
69
64
- func TestExec (t * testing.T ) {
70
+ func TestSumOperator (t * testing.T ) {
65
71
sentence := "5 + 3"
66
72
i := interpreter {}
67
73
i .of (sentence )
Original file line number Diff line number Diff line change
1
+ module github.com/sensorario/go-design-patterns
2
+
3
+ go 1.17
You can’t perform that action at this time.
0 commit comments