-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
postcompile: docs and tests - Adds docs - Adds tests and improves coverage - I'm not sure how to cover the remaining lines in postcompile since most of them are related to failing rustc and cargo commands. There is not a reliable way to crash rustc or cargo as far as I know. CLOUD-13 Requested-by: TroyKomodo <[email protected]> Reviewed-by: TroyKomodo <[email protected]>
- Loading branch information
Showing
5 changed files
with
193 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
crates/postcompile/src/snapshots/postcompile__tests__compile_failure.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
source: crates/postcompile/src/lib.rs | ||
expression: out | ||
snapshot_kind: text | ||
--- | ||
exit status: 1 | ||
--- stderr | ||
error: expected one of `!` or `::`, found `<eof>` | ||
--> <postcompile>:1:1 | ||
| | ||
1 | invalid_rust_code | ||
| ^^^^^^^^^^^^^^^^^ expected one of `!` or `::` | ||
error: aborting due to 1 previous error |
18 changes: 18 additions & 0 deletions
18
crates/postcompile/src/snapshots/postcompile__tests__compile_success.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/postcompile/src/lib.rs | ||
expression: out | ||
snapshot_kind: text | ||
--- | ||
exit status: 0 | ||
--- stdout | ||
#![feature(prelude_import)] | ||
#[prelude_import] | ||
use std::prelude::rust_2021::*; | ||
#[macro_use] | ||
extern crate std; | ||
#[allow(unused)] | ||
fn main() { | ||
let a = 1; | ||
let b = 2; | ||
let c = a + b; | ||
} |