Skip to content

Commit

Permalink
Attempt at testing trybuild caching
Browse files Browse the repository at this point in the history
  • Loading branch information
neysofu committed Aug 26, 2023
1 parent 4d1623c commit 190518b
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 2 deletions.
64 changes: 62 additions & 2 deletions tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/Cargo.toml
Expand Up @@ -9,5 +9,8 @@ edition = "2021"
reqwest = "0.11.18"
watto = { git = "https://github.com/getsentry/watto", rev = "d71c8218506bddba102a124a460d64da25e303dc", features = ["strings"] }

[dev-dependencies]
trybuild = "1"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5.4"
6 changes: 6 additions & 0 deletions tests/tests/trybuild.rs
@@ -0,0 +1,6 @@
#[test]
fn test_trybuild() {
let t = trybuild::TestCases::new();
t.pass("tests/trybuild/empty_main.rs");
t.compile_fail("tests/trybuild/fail_to_compile.rs");
}
1 change: 1 addition & 0 deletions tests/tests/trybuild/empty_main.rs
@@ -0,0 +1 @@
fn main() {}
3 changes: 3 additions & 0 deletions tests/tests/trybuild/fail_to_compile.rs
@@ -0,0 +1,3 @@
fn main() {
"foobar".foobar();
}
5 changes: 5 additions & 0 deletions tests/tests/trybuild/fail_to_compile.stderr
@@ -0,0 +1,5 @@
error[E0599]: no method named `foobar` found for reference `&'static str` in the current scope
--> tests/trybuild/fail_to_compile.rs:2:14
|
2 | "foobar".foobar();
| ^^^^^^ method not found in `&str`

0 comments on commit 190518b

Please sign in to comment.