@@ -171,13 +171,45 @@ func TestT8n(t *testing.T) {
171
171
output : t8nOutput {result : true },
172
172
expOut : "exp2.json" ,
173
173
},
174
+ { // Difficulty calculation - with uncles + Berlin
175
+ base : "./testdata/14" ,
176
+ input : t8nInput {
177
+ "alloc.json" , "txs.json" , "env.uncles.json" , "Berlin" , "" ,
178
+ },
179
+ output : t8nOutput {result : true },
180
+ expOut : "exp_berlin.json" ,
181
+ },
182
+ { // Difficulty calculation on arrow glacier
183
+ base : "./testdata/19" ,
184
+ input : t8nInput {
185
+ "alloc.json" , "txs.json" , "env.json" , "London" , "" ,
186
+ },
187
+ output : t8nOutput {result : true },
188
+ expOut : "exp_london.json" ,
189
+ },
190
+ { // Difficulty calculation on arrow glacier
191
+ base : "./testdata/19" ,
192
+ input : t8nInput {
193
+ "alloc.json" , "txs.json" , "env.json" , "ArrowGlacier" , "" ,
194
+ },
195
+ output : t8nOutput {result : true },
196
+ expOut : "exp_arrowglacier.json" ,
197
+ },
174
198
} {
175
199
176
200
args := []string {"t8n" }
177
201
args = append (args , tc .output .get ()... )
178
202
args = append (args , tc .input .get (tc .base )... )
203
+ var qArgs []string // quoted args for debugging purposes
204
+ for _ , arg := range args {
205
+ if len (arg ) == 0 {
206
+ qArgs = append (qArgs , `""` )
207
+ } else {
208
+ qArgs = append (qArgs , arg )
209
+ }
210
+ }
211
+ tt .Logf ("args: %v\n " , strings .Join (qArgs , " " ))
179
212
tt .Run ("evm-test" , args ... )
180
- tt .Logf ("args: %v\n " , strings .Join (args , " " ))
181
213
// Compare the expected output, if provided
182
214
if tc .expOut != "" {
183
215
want , err := os .ReadFile (fmt .Sprintf ("%v/%v" , tc .base , tc .expOut ))
0 commit comments