Skip to content

Commit 27e5d20

Browse files
committed
Add "str is not Copy/Clone" tests
1 parent 7585475 commit 27e5d20

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

tests/test/string.rs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,31 @@ fn str_is_well_formed() {
2424
fn str_is_not_sized() {
2525
test! {
2626
program {
27-
#[lang(sized)] trait Sized { }
27+
#[lang(sized)] trait Sized {}
2828
}
2929

3030
goal { not { str: Sized } } yields { "Unique" }
3131
}
3232
}
33+
34+
#[test]
35+
fn str_is_not_copy() {
36+
test! {
37+
program {
38+
#[lang(copy)] trait Copy {}
39+
}
40+
41+
goal { not { str: Copy } } yields { "Unique" }
42+
}
43+
}
44+
45+
#[test]
46+
fn str_is_not_clone() {
47+
test! {
48+
program {
49+
#[lang(clone)] trait Clone {}
50+
}
51+
52+
goal { not { str: Clone } } yields { "Unique" }
53+
}
54+
}

0 commit comments

Comments
 (0)