Skip to content

Commit

Permalink
polish cond compile test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash committed Sep 23, 2024
1 parent 2477f81 commit f0ae4fb
Show file tree
Hide file tree
Showing 3 changed files with 261 additions and 46 deletions.
209 changes: 209 additions & 0 deletions crates/moon/tests/test_cases/cond_comp.in/moon.test
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,212 @@
moonc build-package ./src/main/main.mbt -o ./target/native/debug/build/main/main.core -pkg username/hello/main -is-main -i ./target/native/debug/build/lib/lib.mi:lib -pkg-sources username/hello/main:./src/main -target native -g
moonc link-core ./target/native/debug/build/lib/lib.core ./target/native/debug/build/main/main.core -main username/hello/main -o ./target/native/debug/build/main/main.exe -pkg-sources username/hello/lib:./src/lib -pkg-sources username/hello/main:./src/main -target native -g

$ moon check --sort-input

Warning: [1002]
╭─[${WORK_DIR}/src/lib/all.mbt:2:7]
2 │ let a = 1
│ ┬
│ ╰── Warning: Unused variable 'a'
───╯
Finished. moon: ran 3 tasks, now up to date

$ xcat target/wasm-gc/release/check/packages.json
{
"source_dir": "${WORK_DIR}",
"name": "username/hello",
"packages": [
{
"is-main": false,
"is-third-party": false,
"root-path": "${WORK_DIR}/src/lib",
"root": "username/hello",
"rel": "lib",
"files": {
"${WORK_DIR}/src/lib/all.mbt": {
"backend": [
"Wasm",
"WasmGC",
"Js",
"Native"
],
"optlevel": [
"Debug",
"Release"
]
},
"${WORK_DIR}/src/lib/all_wasm.mbt": {
"backend": [
"Wasm",
"WasmGC"
],
"optlevel": [
"Release",
"Debug"
]
},
"${WORK_DIR}/src/lib/js_and_release.mbt": {
"backend": [
"Js"
],
"optlevel": [
"Release"
]
},
"${WORK_DIR}/src/lib/js_or_wasm.mbt": {
"backend": [
"Wasm",
"Js"
],
"optlevel": [
"Release",
"Debug"
]
},
"${WORK_DIR}/src/lib/native_and_wasm.mbt": {
"backend": [
"Wasm",
"Native"
],
"optlevel": [
"Release",
"Debug"
]
},
"${WORK_DIR}/src/lib/native_only.mbt": {
"backend": [
"Native"
],
"optlevel": [
"Release",
"Debug"
]
},
"${WORK_DIR}/src/lib/not_js.mbt": {
"backend": [
"Wasm",
"WasmGC",
"Native"
],
"optlevel": [
"Release",
"Debug"
]
},
"${WORK_DIR}/src/lib/only_debug.mbt": {
"backend": [
"Wasm",
"WasmGC",
"Js",
"Native"
],
"optlevel": [
"Debug"
]
},
"${WORK_DIR}/src/lib/only_js.mbt": {
"backend": [
"Js"
],
"optlevel": [
"Release",
"Debug"
]
},
"${WORK_DIR}/src/lib/only_wasm.mbt": {
"backend": [
"Wasm"
],
"optlevel": [
"Release",
"Debug"
]
},
"${WORK_DIR}/src/lib/only_wasm_gc.mbt": {
"backend": [
"WasmGC"
],
"optlevel": [
"Release",
"Debug"
]
},
"${WORK_DIR}/src/lib/wasm_release_or_js_debug.mbt": {
"backend": [
"Wasm",
"Js"
],
"optlevel": [
"Release",
"Debug"
]
}
},
"wbtest-files": {},
"test-files": {
"${WORK_DIR}/src/lib/hello_test.mbt": {
"backend": [
"Wasm",
"WasmGC",
"Js",
"Native"
],
"optlevel": [
"Debug",
"Release"
]
},
"${WORK_DIR}/src/lib/js_only_test.mbt": {
"backend": [
"Js"
],
"optlevel": [
"Release",
"Debug"
]
}
},
"deps": [],
"wbtest-deps": [],
"test-deps": [],
"artifact": "${WORK_DIR}/target/wasm-gc/release/check/lib/lib.mi"
},
{
"is-main": true,
"is-third-party": false,
"root-path": "${WORK_DIR}/src/main",
"root": "username/hello",
"rel": "main",
"files": {
"${WORK_DIR}/src/main/main.mbt": {
"backend": [
"Wasm",
"WasmGC",
"Js",
"Native"
],
"optlevel": [
"Debug",
"Release"
]
}
},
"wbtest-files": {},
"test-files": {},
"deps": [
{
"path": "username/hello/lib",
"alias": "lib"
}
],
"wbtest-deps": [],
"test-deps": [],
"artifact": "${WORK_DIR}/target/wasm-gc/release/check/main/main.mi"
}
],
"deps": [],
"backend": "wasm-gc",
"opt_level": "release",
"source": "src"
}
Loading

0 comments on commit f0ae4fb

Please sign in to comment.