def test_field_annotation_in_instruction_invalid_character(self, client): assert_typecheck_data_failure( client, '{ CAR %. }', 'lambda (pair (nat %.) (int %.)) nat', 'unexpected annotation', )
def test_field_annotation_in_type_invalid_character(self, client): assert_typecheck_data_failure( client, 'Pair 0 0', 'pair (nat %.) (int %.)', 'unexpected annotation', )
def test_annotation_length_failure(self, client: Client): assert_typecheck_data_failure( client, '3', f"(int :{'a' * 255})", r'annotation exceeded maximum length \(255 chars\)', )
def test_order_of_pairs(self, client): # tests that badly-ordered set literals are rejected utils.assert_typecheck_data_failure(client, '{Pair 0 "foo"; Pair 0 "bar"}', '(set (pair nat string))') utils.assert_typecheck_data_failure(client, '{Pair 1 "bar"; Pair 0 "foo"}', '(set (pair nat string))')
def test_non_comparable_non_comb_pair(self, client): # tests that non-comb pairs are rejected by the typechecker utils.assert_typecheck_data_failure(client, '{}', '(set (pair (pair nat nat) nat))')