mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-28 02:42:21 +00:00
✅ tighten cross-target capability contracts
This commit is contained in:
@@ -174,6 +174,14 @@ test "async runtime capability helpers stay consistent" {
|
||||
)
|
||||
}
|
||||
|
||||
test "async runtime mode and worker flag encode target contract" {
|
||||
let mode_label = async_runtime_mode_label(async_runtime_mode())
|
||||
let worker = async_runtime_supports_background_worker()
|
||||
inspect(mode_label == "native_worker" || mode_label == "compatibility", content="true")
|
||||
inspect((mode_label == "native_worker") == worker, content="true")
|
||||
inspect((mode_label == "compatibility") == !worker, content="true")
|
||||
}
|
||||
|
||||
test "async logger state snapshot reflects current counters and runtime" {
|
||||
let logger = async_logger(
|
||||
@bitlogger.callback_sink(fn(_) {
|
||||
|
||||
@@ -10,6 +10,9 @@ import {
|
||||
|
||||
options(
|
||||
targets: {
|
||||
"async_logger_shared.mbt": [ "native", "llvm", "js", "wasm", "wasm-gc" ],
|
||||
"application_async_logger.mbt": [ "native", "llvm", "js", "wasm", "wasm-gc" ],
|
||||
"library_async_logger.mbt": [ "native", "llvm", "js", "wasm", "wasm-gc" ],
|
||||
"async_logger_native.mbt": [ "native", "llvm" ],
|
||||
"async_logger_stub.mbt": [ "js", "wasm", "wasm-gc" ],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user