From 2c0ae15fbe603b1deda2ec12306a0dadb5e6f5a3 Mon Sep 17 00:00:00 2001 From: John Turner Date: Mon, 17 Apr 2023 00:59:36 -0400 Subject: added test case unit-struct.rs --- tests/get.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/get.rs') diff --git a/tests/get.rs b/tests/get.rs index 4019cd5..8a61a69 100644 --- a/tests/get.rs +++ b/tests/get.rs @@ -39,3 +39,9 @@ fn cat_tuple_struct() { assert_eq!(*cat.age(), 1); assert!(matches!(cat.owner(), ())); } + +#[test] +fn trybuild() { + let tests = trybuild::TestCases::new(); + tests.compile_fail(testcase!("unit-struct.rs")); +} -- cgit v1.2.3