diff --git a/crates/moon/tests/test_cases/specify_source_dir_001.in/moon.test b/crates/moon/tests/test_cases/specify_source_dir_001.in/moon.test index 7e489546..d376b622 100644 --- a/crates/moon/tests/test_cases/specify_source_dir_001.in/moon.test +++ b/crates/moon/tests/test_cases/specify_source_dir_001.in/moon.test @@ -17,7 +17,7 @@ moonc build-package ./src/lib/hello.mbt ./target/wasm-gc/debug/test/lib/__generated_driver_for_internal_test.mbt -o ./target/wasm-gc/debug/test/lib/lib.internal_test.core -pkg username/hello/lib -is-main -std-path $MOON_HOME/lib/core/target/wasm-gc/release/bundle -pkg-sources username/hello/lib:./src/lib -target wasm-gc -g moonc link-core $MOON_HOME/lib/core/target/wasm-gc/release/bundle/core.core ./target/wasm-gc/debug/test/lib/lib.internal_test.core -main username/hello/lib -o ./target/wasm-gc/debug/test/lib/lib.internal_test.wasm -test-mode -pkg-sources username/hello/lib:./src/lib -pkg-sources moonbitlang/core:$MOON_HOME/lib/core -target wasm-gc -g - $ moon check + $ moon check --sort-input Finished. moon: ran 3 tasks, now up to date diff --git a/crates/moonbuild/template/test_driver_template.mbt b/crates/moonbuild/template/test_driver_template.mbt index a77b4e0c..add8ea1a 100644 --- a/crates/moonbuild/template/test_driver_template.mbt +++ b/crates/moonbuild/template/test_driver_template.mbt @@ -171,7 +171,7 @@ fn main { // =========== ffi start =========== -fn _moonbit_test_driver_internal_get_file_name() -> ExternString = "test" "get_file_name" +fn _moonbit_test_driver_internal_get_file_name() -> MoonbitTestDriverInternalExternString = "test" "get_file_name" fn moonbit_test_driver_internal_get_file_name() -> String { let file_name = _moonbit_test_driver_internal_get_file_name() moonbit_test_driver_internal_string_from_extern(file_name) @@ -179,18 +179,18 @@ fn moonbit_test_driver_internal_get_file_name() -> String { fn moonbit_test_driver_internal_get_index() -> Int = "test" "get_index" -type StringReadHandle +type MoonbitTestDriverInternalStringReadHandle -type ExternString +type MoonbitTestDriverInternalExternString -fn moonbit_test_driver_internal_begin_read_string(s : ExternString) -> StringReadHandle = "__moonbit_fs_unstable" "begin_read_string" +fn moonbit_test_driver_internal_begin_read_string(s : MoonbitTestDriverInternalExternString) -> MoonbitTestDriverInternalStringReadHandle = "__moonbit_fs_unstable" "begin_read_string" -fn moonbit_test_driver_internal_string_read_char(handle : StringReadHandle) -> Int = "__moonbit_fs_unstable" "string_read_char" +fn moonbit_test_driver_internal_string_read_char(handle : MoonbitTestDriverInternalStringReadHandle) -> Int = "__moonbit_fs_unstable" "string_read_char" -fn moonbit_test_driver_internal_finish_read_string(handle : StringReadHandle) = "__moonbit_fs_unstable" "finish_read_string" +fn moonbit_test_driver_internal_finish_read_string(handle : MoonbitTestDriverInternalStringReadHandle) = "__moonbit_fs_unstable" "finish_read_string" -fn moonbit_test_driver_internal_string_from_extern(e : ExternString) -> String { - let buf = Buffer::new() +fn moonbit_test_driver_internal_string_from_extern(e : MoonbitTestDriverInternalExternString) -> String { + let buf = @moonbitlang/core/builtin.Buffer::new() let handle = moonbit_test_driver_internal_begin_read_string(e) while true { let ch = moonbit_test_driver_internal_string_read_char(handle) diff --git a/crates/moonbuild/template/test_driver_template2.mbt b/crates/moonbuild/template/test_driver_template2.mbt index 2bd5f34d..f68810b9 100644 --- a/crates/moonbuild/template/test_driver_template2.mbt +++ b/crates/moonbuild/template/test_driver_template2.mbt @@ -129,7 +129,7 @@ fn main { // =========== ffi start =========== -fn _moonbit_test_driver_internal_get_file_name() -> ExternString = "test" "get_file_name" +fn _moonbit_test_driver_internal_get_file_name() -> MoonbitTestDriverInternalExternString = "test" "get_file_name" fn moonbit_test_driver_internal_get_file_name() -> String { let file_name = _moonbit_test_driver_internal_get_file_name() moonbit_test_driver_internal_string_from_extern(file_name) @@ -137,18 +137,18 @@ fn moonbit_test_driver_internal_get_file_name() -> String { fn moonbit_test_driver_internal_get_index() -> Int = "test" "get_index" -type StringReadHandle +type MoonbitTestDriverInternalStringReadHandle -type ExternString +type MoonbitTestDriverInternalExternString -fn moonbit_test_driver_internal_begin_read_string(s : ExternString) -> StringReadHandle = "__moonbit_fs_unstable" "begin_read_string" +fn moonbit_test_driver_internal_begin_read_string(s : MoonbitTestDriverInternalExternString) -> MoonbitTestDriverInternalStringReadHandle = "__moonbit_fs_unstable" "begin_read_string" -fn moonbit_test_driver_internal_string_read_char(handle : StringReadHandle) -> Int = "__moonbit_fs_unstable" "string_read_char" +fn moonbit_test_driver_internal_string_read_char(handle : MoonbitTestDriverInternalStringReadHandle) -> Int = "__moonbit_fs_unstable" "string_read_char" -fn moonbit_test_driver_internal_finish_read_string(handle : StringReadHandle) = "__moonbit_fs_unstable" "finish_read_string" +fn moonbit_test_driver_internal_finish_read_string(handle : MoonbitTestDriverInternalStringReadHandle) = "__moonbit_fs_unstable" "finish_read_string" -fn moonbit_test_driver_internal_string_from_extern(e : ExternString) -> String { - let buf = Buffer::new() +fn moonbit_test_driver_internal_string_from_extern(e : MoonbitTestDriverInternalExternString) -> String { + let buf = @moonbitlang/core/builtin.Buffer::new() let handle = moonbit_test_driver_internal_begin_read_string(e) while true { let ch = moonbit_test_driver_internal_string_read_char(handle)