def test_eval_Case1(self): x = preparse(v.x) eq_( eval( case(2).of(1)[prin(1)].of(2, 3)[prin(quote((2, 3))), quote((2, 3))].els[prin(5)]), (2, 3))
def test_eval_Case3(self): x = preparse(v.x) eq_( eval( begin( v.x << quote((1, 2)), case(x).of((1, 2), (3, 4))[prin(x), x].of(2, 3)[prin( (2, 3)), (2, 3)].els[prin(5)])), (1, 2))
def testeval2(self): eq_(eval(let([(x,1)], eval_(quote(x)))), 1)
def testeval1(self): eq_(eval(eval_(quote(1))), (1)) eq_(eval(eval_(quote(add(1, 1)))), (2))
def testquote(self): eq_(eval(quote(x)), x)
def test_eval_getitem2(self): eq_( eval( each(v.i, v.j)[range(2)][range(2)].loop[prin(v.i, v.j), quote((v.i, v.j))]), None)
def test_eval_getitem1(self): eq_( eval( each(v.i, v.j)[zip(range(2), range(2))].loop[prin(v.i, v.j), quote((v.i, v.j))]), None)
def test_eval_slice(self): eq_( eval( each(v.i, v.j)[1:3][1:3].loop[prin(v.i, v.j), quote((v.i, v.j))]), None)
def test_eval_getitem2(self): eq_(eval(each(v.i,v.j)[range(2)][range(2)].loop[prin(v.i, v.j), quote((v.i, v.j))]), None)
def test_eval_getitem1(self): eq_(eval(each(v.i,v.j)[zip(range(2), range(2))].loop[prin(v.i, v.j), quote((v.i, v.j))]), None)
def test_eval_slice(self): eq_(eval(each(v.i,v.j)[1:3][1:3].loop[prin(v.i, v.j), quote((v.i, v.j))]), None)
def test_eval_Case3(self): x = preparse(v.x) eq_(eval(begin(v.x<<quote((1,2)), case(x).of((1,2), (3,4))[prin(x), x].of(2,3)[prin((2,3)), (2,3)].els[prin(5)])), (1,2))
def test_eval_Case1(self): x = preparse(v.x) eq_(eval(case(2).of(1)[prin(1)].of(2,3)[prin(quote((2,3))), quote((2,3))].els[prin(5)]), (2,3))
def testquote(self): eq_(preparse(quote(x)), quote(x))