@@ -9,8 +9,8 @@ func TestParse0(t *testing.T) {
9
9
10
10
` )
11
11
ds := Parse (tokens )
12
- if ds .Val (nil ) != 30 {
13
- t .Error (ds .Val (nil ), "not equals 30" )
12
+ if ds .Int (nil ) != 30 {
13
+ t .Error (ds .Int (nil ), "not equals 30" )
14
14
}
15
15
}
16
16
@@ -21,8 +21,8 @@ func TestParse(t *testing.T) {
21
21
22
22
` )
23
23
ds := Parse (tokens )
24
- if ds .Val (nil ) != 24 {
25
- t .Error (ds .Val (nil ), "not equals 24" )
24
+ if ds .Int (nil ) != 24 {
25
+ t .Error (ds .Int (nil ), "not equals 24" )
26
26
}
27
27
}
28
28
@@ -33,8 +33,8 @@ func TestParse1(t *testing.T) {
33
33
34
34
` )
35
35
ds := Parse (tokens )
36
- if ds .Val (nil ) != 27 {
37
- t .Error (ds .Val (nil ), "not equals 27" )
36
+ if ds .Int (nil ) != 27 {
37
+ t .Error (ds .Int (nil ), "not equals 27" )
38
38
}
39
39
}
40
40
@@ -45,8 +45,8 @@ $1*6 - 3
45
45
46
46
` )
47
47
ds := Parse (tokens )
48
- if ds .Val ([]int {1 }) != 3 {
49
- t .Error (ds .Val ([]int {1 }), "not equals 3" )
48
+ if ds .Int ([]int {1 }) != 3 {
49
+ t .Error (ds .Int ([]int {1 }), "not equals 3" )
50
50
}
51
51
}
52
52
@@ -57,8 +57,8 @@ $1*$2 - 3
57
57
58
58
` )
59
59
ds := Parse (tokens )
60
- if ds .Val ([]int {1 , 3 }) != 0 {
61
- t .Error (ds .Val ([]int {1 , 3 }), "not equals 0" )
60
+ if ds .Int ([]int {1 , 3 }) != 0 {
61
+ t .Error (ds .Int ([]int {1 , 3 }), "not equals 0" )
62
62
}
63
63
}
64
64
@@ -69,8 +69,8 @@ $1* ($2 - 3)
69
69
70
70
` )
71
71
ds := Parse (tokens )
72
- if ds .Val ([]int {2 , 4 }) != 2 {
73
- t .Error (ds .Val ([]int {2 , 4 }), "not equals 2" )
72
+ if ds .Int ([]int {2 , 4 }) != 2 {
73
+ t .Error (ds .Int ([]int {2 , 4 }), "not equals 2" )
74
74
}
75
75
}
76
76
@@ -81,8 +81,8 @@ func TestParseClosure1(t *testing.T) {
81
81
82
82
` )
83
83
ds := Parse (tokens )
84
- if ds .Val ([]int {2 , 4 }) != 2 {
85
- t .Error (ds .Val ([]int {2 , 4 }), "not equals 2" )
84
+ if ds .Int ([]int {2 , 4 }) != 2 {
85
+ t .Error (ds .Int ([]int {2 , 4 }), "not equals 2" )
86
86
}
87
87
}
88
88
@@ -93,8 +93,8 @@ func TestParseClosure3(t *testing.T) {
93
93
94
94
` )
95
95
ds := Parse (tokens )
96
- if ds .Val ([]int {2 , 4 }) != 5 {
97
- t .Error (ds .Val ([]int {2 , 4 }), "not equals 5" )
96
+ if ds .Int ([]int {2 , 4 }) != 5 {
97
+ t .Error (ds .Int ([]int {2 , 4 }), "not equals 5" )
98
98
}
99
99
}
100
100
@@ -105,8 +105,8 @@ func TestParseClosure0(t *testing.T) {
105
105
106
106
` )
107
107
ds := Parse (tokens )
108
- if ds .Val ([]int {2 , 4 }) != 1 {
109
- t .Error (ds .Val ([]int {2 , 4 }), "not equals 1" )
108
+ if ds .Int ([]int {2 , 4 }) != 1 {
109
+ t .Error (ds .Int ([]int {2 , 4 }), "not equals 1" )
110
110
}
111
111
}
112
112
@@ -119,7 +119,7 @@ func TestParseClosure2(t *testing.T) {
119
119
120
120
` )
121
121
ds := Parse (tokens )
122
- if ds .Val ([]int {49 , 48 , 48 , 48 }) != 16 {
123
- t .Error (ds .Val ([]int {49 , 48 , 48 , 48 }), "not equals 16" )
122
+ if ds .Int ([]int {49 , 48 , 48 , 48 }) != 16 {
123
+ t .Error (ds .Int ([]int {49 , 48 , 48 , 48 }), "not equals 16" )
124
124
}
125
125
}
0 commit comments