Skip to content

Commit

Permalink
internal: add compile conds into packages.json for ide
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash committed Sep 12, 2024
1 parent b965069 commit 1b7b7f1
Show file tree
Hide file tree
Showing 22 changed files with 720 additions and 213 deletions.
3 changes: 1 addition & 2 deletions crates/moon/src/cli/generate_test_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ pub fn generate_test_driver(
DriverKind::Blackbox => (&pkg.test_files, BLACKBOX_TEST_DRIVER),
};

let backend_filtered: Vec<PathBuf> =
moonutil::common::backend_filter(files, pkg.targets.as_ref(), &moonc_opt);
let backend_filtered: Vec<PathBuf> = moonutil::common::backend_filter(files, &moonc_opt);
let mbts_test_data =
moonc_gen_test_info(&backend_filtered, &target_dir.join(pkg.rel.fs_full_name()))?;

Expand Down
3 changes: 3 additions & 0 deletions crates/moon/tests/test_cases/cond_comp.in/src/lib/all.mbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pub fn hello() -> String {
let a = 1

"Hello, world!"

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test {
let a = 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
test {
let a = 1

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test {
let a = 1
}
3 changes: 3 additions & 0 deletions crates/moon/tests/test_cases/cond_comp.in/src/lib/not_js.mbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test {
let a = 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test {
let a = 1
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub fn hello2() -> String {
let a = 1
"Hello, world!"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fn main {
println(@lib.hello())

}
Loading

0 comments on commit 1b7b7f1

Please sign in to comment.