Changeset - 8e72ec01be84
[Not reviewed]
0 1 0
mh - 4 years ago 2021-12-15 08:26:02
contact@maxhenger.nl
Add test for incorrect tuple member type
1 file changed with 13 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/protocol/tests/parser_validation.rs
Show inline comments
 
@@ -407,6 +407,19 @@ fn test_correct_tuple_members() {
 
    });
 
}
 

	
 
#[test]
 
fn test_incorrect_tuple_member() {
 
    // Test not really necessary, but hey, what's a test between friends
 
    Tester::new_single_source_expect_err(
 
        "unknown tuple member",
 
        "struct Foo{ (u32, u32, u32, YouThirstySchmoo) field }"
 
    ).error(|e| { e
 
        .assert_num(1)
 
        .assert_msg_has(0, "unknown type")
 
        .assert_occurs_at(0, "YouThirstySchmoo");
 
    });
 
}
 

	
 
#[test]
 
fn test_correct_tuple_polymorph_args() {
 
    Tester::new_single_source_expect_ok(
0 comments (0 inline, 0 general)