Diff
Not logged in

Differences From Artifact [bd6a863bd24c7016]:

To Artifact [197c2cfb75326106]:


411 enrollRuntimeLibrary(e); 411 enrollRuntimeLibrary(e); 412 assert_nothrow( e.evalString(` 412 assert_nothrow( e.evalString(` 413 @macro twice(x) { x; x }; 413 @macro twice(x) { x; x }; 414 def main() { twice(1) }; 414 def main() { twice(1) }; 415 main() 415 main() 416 `) ); 416 `) ); 417 } 417 } > 418 unittest > 419 { > 420 auto e = new Evaluator; > 421 enrollRuntimeLibrary(e); > 422 assert_nothrow( e.evalString(`case 1`) ); > 423 assert_nothrow( e.evalString(`case 1 when 1: 2`) ); > 424 } > 425 418 /* 426 /* 419 unittest 427 unittest 420 { 428 { 421 assert_eq( evalString(`var fac = fun(x){ 429 assert_eq( evalString(`var fac = fun(x){ 422 if(x) 430 if(x) 423 { x*fac(x-1); } 431 { x*fac(x-1); } 424 else 432 else