Skip to content

Commit 9bb41bd

Browse files
Add unit test for word.rs module registration
Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com>
1 parent 514e6c0 commit 9bb41bd

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎stdlib/src/word.rs‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,20 @@ impl StdlibRegistry {
1919
);
2020
}
2121
}
22+
23+
#[cfg(test)]
24+
mod tests {
25+
use super::*;
26+
27+
#[test]
28+
fn test_register_word() {
29+
let mut registry = StdlibRegistry::new();
30+
registry.register_word();
31+
32+
let module = registry.get_module("std.word").expect("Module std.word should be registered");
33+
assert_eq!(module.name, "std.word");
34+
assert_eq!(module.version, "1.0.0");
35+
assert!(module.exports.is_empty());
36+
assert!(module.required_capabilities.is_empty());
37+
}
38+
}

0 commit comments

Comments
 (0)