Skip to content

Commit

Permalink
Move generated test modules for rust_legacy to pdl-compiler/tests/gen…
Browse files Browse the repository at this point in the history
…erated/rust_legacy
  • Loading branch information
hchataing committed Apr 29, 2024
1 parent 26744fe commit 3438474
Show file tree
Hide file tree
Showing 80 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pdl-compiler/src/backends/rust_legacy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ mod tests {
let file = analyzer::analyze(&file).unwrap();
let actual_code = generate(&db, &file);
assert_snapshot_eq(
&format!("tests/generated/{name}_{endianness}.rs"),
&format!("tests/generated/rust_legacy/{name}_{endianness}.rs"),
&format_rust(&actual_code),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pdl-compiler/src/backends/rust_legacy/preamble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ mod tests {
#[test]
fn test_generate_preamble() {
let actual_code = generate(Path::new("some/path/foo.pdl")).to_string();
assert_snapshot_eq("tests/generated/preamble.rs", &format_rust(&actual_code));
assert_snapshot_eq("tests/generated/rust_legacy/preamble.rs", &format_rust(&actual_code));
}
}
2 changes: 1 addition & 1 deletion pdl-compiler/tests/compile_rust_generated_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OUT_DIR="$(pwd)/out"
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &> /dev/null

mkdir -p "$OUT_DIR/generated_test/src"
./tests/generated_files_compile.sh tests/generated/*.rs > "$OUT_DIR/generated_test/src/lib.rs"
./tests/generated_files_compile.sh tests/generated/rust_legacy/*.rs > "$OUT_DIR/generated_test/src/lib.rs"

cat <<EOT > "$OUT_DIR/generated_test/Cargo.toml"
[package]
Expand Down
File renamed without changes.

0 comments on commit 3438474

Please sign in to comment.