Ejemplo n.º 1
0
    def method_has_dynamic_arguments(self):
        node = cs.method("f", [cs.arg("x"), cs.arg("y")], [])
        expected = """internal dynamic f(dynamic x, dynamic y) {
}
"""
        assert_equal(expected, cs.dumps(node))
Ejemplo n.º 2
0
    def arguments_have_dynamic_type(self):
        node = cs.lambda_([cs.arg("x")], [])
        expected = """((dynamic x) =>
{
})"""
        assert_equal(expected, cs.dumps(node))
Ejemplo n.º 3
0
    def arguments_are_separated_by_commas(self):
        node = cs.lambda_([cs.arg("x"), cs.arg("y")], [])
        expected = """((dynamic x, dynamic y) =>
{
})"""
        assert_equal(expected, cs.dumps(node))