We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ab8b1f commit fed54ebCopy full SHA for fed54eb
arc-lang/tests/verify_builtins.rs
@@ -0,0 +1,22 @@
1
+#[test]
2
+fn test() {
3
+ let decls = ast_prelude::prelude()
4
+ .into_iter()
5
+ .filter_map(|s| {
6
+ if let ast::StmtKind::SBuiltinDef(_, x, ..) = s.kind {
7
+ Some(x)
8
+ } else {
9
+ None
10
+ }
11
+ })
12
+ .collect::<std::collections::HashSet<String>>();
13
+ let defs = hir_interpreter::definitions::Bifs::new();
14
+
15
+ for x in &decls {
16
+ assert!(defs.0.contains_key(x.as_str()), "{} is undefined", x);
17
18
19
+ for x in defs.0.keys() {
20
+ assert!(decls.contains(*x), "{} is undeclared", x);
21
22
+}
0 commit comments