Skip to content

Commit eb563ed

Browse files
committed
small refactoring to improve the readability of code
1 parent 8356cfc commit eb563ed

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

behavioral/interpreter/interpreter_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestNodesCantBeNormalString(t *testing.T) {
1717
func TestFoo(t *testing.T) {
1818
sentence := "do something"
1919
i := interpreter{}
20-
_ = i.of(sentence)
20+
i.of(sentence)
2121
if i.numberOfWords() != 2 {
2222
t.Error("Guarda che ti stai sbagliando")
2323
}
@@ -26,7 +26,7 @@ func TestFoo(t *testing.T) {
2626
func TestPlusOperatorDetector(t *testing.T) {
2727
sentence := "2 + 3"
2828
i := interpreter{}
29-
_ = i.of(sentence)
29+
i.of(sentence)
3030
if i.contains("+") != true {
3131
t.Error("dovrebbe conoscere l'operatore +")
3232
}
@@ -38,7 +38,7 @@ func TestPlusOperatorDetector(t *testing.T) {
3838
func TestSplitSentencesInSplice(t *testing.T) {
3939
sentence := "2 + 3"
4040
i := interpreter{}
41-
_ = i.of(sentence)
41+
i.of(sentence)
4242
expected := []string{"2", "+", "3"}
4343
for ind, _ := range expected {
4444
tok := i.tokens()
@@ -51,7 +51,7 @@ func TestSplitSentencesInSplice(t *testing.T) {
5151
func TestCountNumberOfOperators(t *testing.T) {
5252
sentence := "2 + 3"
5353
i := interpreter{}
54-
_ = i.of(sentence)
54+
i.of(sentence)
5555
expected := []string{"2", "+", "3"}
5656
for ind, _ := range expected {
5757
tok := i.tokens()
@@ -64,7 +64,7 @@ func TestCountNumberOfOperators(t *testing.T) {
6464
func TestExec(t *testing.T) {
6565
sentence := "5 + 3"
6666
i := interpreter{}
67-
_ = i.of(sentence)
67+
i.of(sentence)
6868
if i.exec() != 8 {
6969
t.Error([]string{
7070
"La somma di 5 con 3",
@@ -77,7 +77,7 @@ func TestExec(t *testing.T) {
7777
func TestMulOperator(t *testing.T) {
7878
sentence := "5 * 3"
7979
i := interpreter{}
80-
_ = i.of(sentence)
80+
i.of(sentence)
8181
if i.exec() != 15 {
8282
t.Error([]string{
8383
"Multiplication between 5 and 3",

0 commit comments

Comments
 (0)