Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/threads/threads.txs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ spawn_fn = thread["spawn"]
join_fn = thread["join"]

do task_a()
time.sleep(100)
time.sleep(200)
say "Task A completed on worker thread."
end

do task_b()
time.sleep(50)
time.sleep(20)
say "Task B completed on worker thread."
end

Expand Down
18 changes: 18 additions & 0 deletions stdlib/src/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ impl StdlibRegistry {
);
}
}

#[cfg(test)]
mod tests {
use super::*;
use crate::StdlibRegistry;

#[test]
fn test_register_docs() {
let registry = StdlibRegistry::new();
let module = registry
.get_module("std.docs")
.expect("std.docs module should be registered");

assert_eq!(module.name, "std.docs");
assert_eq!(module.version, "1.0.0");
assert!(module.required_capabilities.is_empty());
}
}
12 changes: 12 additions & 0 deletions stdlib/tests/stdlib_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1331,3 +1331,15 @@ fn test_uuid_module() {
assert!(!uuid_str.is_empty());
assert!(uuid_str.contains("-"));
}

#[test]
fn test_docs_module() {
let registry = StdlibRegistry::new();
let docs = registry
.get_module("std.docs")
.expect("std.docs module should be registered");

assert_eq!(docs.name, "std.docs");
assert_eq!(docs.version, "1.0.0");
assert!(docs.required_capabilities.is_empty());
}
Loading