mod common; assert_ok! { typeof_int( "@typeof 23", "
int
", ); typeof_str( "@typeof `foobar`", "str
", ); typeof_bool( "@typeof True", "bool
", ); typeof_none( "@typeof .", "none
", ); typeof_int_list( "@typeof [1, 2, 3]", "int list
", ); typeof_int_option_list( "@typeof [1, ., 2, ., 3]", "int? list
", ); typeof_str_list( "@typeof [`foo`, `bar`]", "str list
", ); typeof_int_dict( "@typeof @dict::new(x=1, y=2).", "int dict
", ); typeof_str_dict( "@typeof @dict::new(x=`foo`, y=`bar`).", "str dict
", ); typeof_bare_str( "@typeof foobar", "str
", ); typeof_bare_str_list( "@typeof [foo, bar]", "str list
", ); call_optional_str( "@fn foo($_0: str?) $_: none -> OK\n@foo(`bar`).", "OK
", ); call_int_list( "@fn foo($_0: int list) $_: none -> OK\n@foo([1, 2, 3]).", "OK
", ); call_optional_int_list( "@fn foo($_0: int list?) $_: none -> OK\n@foo([1, 2, 3]).", "OK
", ); }