def test_too_many_unquote(self): assert_raises(DaoSyntaxError, eval, quasiquote((unquote(unquote(add(1,1))),2)))
def test_unquote_add(self): eq_(eval(quasiquote((unquote(add(1,1)),2))), (2,2))
def test_unquote_slice(self): eq_(eval(quasiquote((unquote(add(1,1)),unquote_slice(quote((3,4)))))), (2,3,4))
def test_unquote_slice1(self): assert_raises(DaoSyntaxError, eval, quasiquote(unquote_slice(add(1,1))))
def test_tuple1(self): eq_(eval(quasiquote((1,))), (1,)) eq_(eval(quasiquote((1,2))), (1,2)) eq_(eval(quasiquote((add(1,1),2))), ((add,1,1),2))
def test_simple1(self): eq_(eval(quasiquote(1)), 1)
def test_unquote1(self): eq_(eval(quasiquote(unquote(add(1,1)))), 2)
def test_unquote_slice(self): eq_( eval( quasiquote((unquote(add(1, 1)), unquote_splice(quote( (3, 4)))))), (2, 3, 4))
def test_too_many_unquote(self): assert_raises(DaoSyntaxError, eval, quasiquote((unquote(unquote(add(1, 1))), 2)))
def test_unquote_add(self): eq_(eval(quasiquote((unquote(add(1, 1)), 2))), (2, 2))
def test_tuple1(self): eq_(eval(quasiquote((1, ))), (1, )) eq_(eval(quasiquote((1, 2))), (1, 2)) eq_(eval(quasiquote((add(1, 1), 2))), ((add, 1, 1), 2))
def test_unquote_slice1(self): assert_raises(DaoSyntaxError, eval, quasiquote(unquote_splice(add(1, 1))))
def test_unquote1(self): eq_(eval(quasiquote(unquote(add(1, 1)))), 2)