diff options
author | Nadrieril | 2024-05-27 11:22:37 +0200 |
---|---|---|
committer | Nadrieril | 2024-05-27 14:40:34 +0200 |
commit | 9c09789c26dd8142b8a29b42e250a685aa983e58 (patch) | |
tree | 0ba6a9de8a5aa7c3c037022c0446ed2bf772227f /tests/src | |
parent | aee6dc227c4ed041bbbae7cf38729a4b1a3a6869 (diff) |
runner: Support negative tests
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/mutually-recursive-traits.lean.out | 17 | ||||
-rw-r--r-- | tests/src/mutually-recursive-traits.rs | 11 | ||||
-rw-r--r-- | tests/src/string-chars.lean.out | 21 | ||||
-rw-r--r-- | tests/src/string-chars.rs | 6 |
4 files changed, 55 insertions, 0 deletions
diff --git a/tests/src/mutually-recursive-traits.lean.out b/tests/src/mutually-recursive-traits.lean.out new file mode 100644 index 00000000..33206fe5 --- /dev/null +++ b/tests/src/mutually-recursive-traits.lean.out @@ -0,0 +1,17 @@ +[[92mInfo[39m ] Imported: tests/llbc/mutually_recursive_traits.llbc +[[91mError[39m] In file Translate.ml, line 813: +Mutually recursive trait declarations are not supported + +Uncaught exception: + + (Failure + "In file Translate.ml, line 813:\ + \nIn file Translate.ml, line 813:\ + \nMutually recursive trait declarations are not supported") + +Raised at Aeneas__Errors.craise_opt_span in file "Errors.ml", line 46, characters 4-76 +Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15 +Called from Aeneas__Translate.extract_definitions in file "Translate.ml", line 836, characters 2-52 +Called from Aeneas__Translate.extract_file in file "Translate.ml", line 954, characters 2-36 +Called from Aeneas__Translate.translate_crate in file "Translate.ml", line 1502, characters 5-42 +Called from Dune__exe__Main in file "Main.ml", line 276, characters 9-61 diff --git a/tests/src/mutually-recursive-traits.rs b/tests/src/mutually-recursive-traits.rs new file mode 100644 index 00000000..351763b2 --- /dev/null +++ b/tests/src/mutually-recursive-traits.rs @@ -0,0 +1,11 @@ +//@ [lean] known-failure +//@ [coq,fstar] skip +//@ subdir=misc +pub trait Trait1 { + type T: Trait2; +} + +pub trait Trait2: Trait1 {} + +pub trait T1<T: T2<Self>>: Sized {} +pub trait T2<T: T1<Self>>: Sized {} diff --git a/tests/src/string-chars.lean.out b/tests/src/string-chars.lean.out new file mode 100644 index 00000000..0d28744f --- /dev/null +++ b/tests/src/string-chars.lean.out @@ -0,0 +1,21 @@ +[[92mInfo[39m ] Imported: tests/llbc/string_chars.llbc +[[91mError[39m] In file SymbolicToPure.ml, line 588: +ADTs containing borrows are not supported yet +Source: '/rustc/ad963232d9b987d66a6f8e6ec4141f672b8b9900/library/core/src/str/iter.rs', lines 32:0-32:20 + +Uncaught exception: + + (Failure + "In file SymbolicToPure.ml, line 588:\ + \nIn file SymbolicToPure.ml, line 588:\ + \nADTs containing borrows are not supported yet\ + \nSource: '/rustc/ad963232d9b987d66a6f8e6ec4141f672b8b9900/library/core/src/str/iter.rs', lines 32:0-32:20\ + \nSource: '/rustc/ad963232d9b987d66a6f8e6ec4141f672b8b9900/library/core/src/str/iter.rs', lines 32:0-32:20") + +Raised at Aeneas__Errors.craise_opt_span in file "Errors.ml", line 46, characters 4-76 +Called from Aeneas__SymbolicToPure.translate_type_decl in file "SymbolicToPure.ml", line 588, characters 2-113 +Called from Aeneas__SymbolicToPure.translate_type_decls.(fun) in file "SymbolicToPure.ml", line 3923, characters 15-42 +Called from Stdlib__List.filter_map.aux in file "list.ml", line 258, characters 14-17 +Called from Aeneas__Translate.translate_crate_to_pure in file "Translate.ml", line 229, characters 19-64 +Called from Aeneas__Translate.translate_crate in file "Translate.ml", line 981, characters 4-33 +Called from Dune__exe__Main in file "Main.ml", line 276, characters 9-61 diff --git a/tests/src/string-chars.rs b/tests/src/string-chars.rs new file mode 100644 index 00000000..5ba9a2d6 --- /dev/null +++ b/tests/src/string-chars.rs @@ -0,0 +1,6 @@ +//@ [lean] known-failure +//@ [coq,fstar] skip +fn main() { + let s = "hello"; + let _chs: Vec<char> = s.chars().collect(); +} |