Skip to content

Commit

Permalink
Update tests with namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
garritfra committed Dec 1, 2023
1 parent c6dd40c commit 44d45c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/modules/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Let's say we have a module named `math.sb` in the same directory as out `main.sb
import "math"
fn main() {
println(add(1, 2))
println(math::add(1, 2))
}
```

Expand Down
2 changes: 1 addition & 1 deletion tests/importable_module/module.sb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import "foo/bar"

fn external_function() {
println("I was called!!")
nested_module()
bar::nested_module()
}
2 changes: 1 addition & 1 deletion tests/imports.sb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import "importable_module"

fn imports_main() {
log_test_stage("Testing imports")
external_function()
importable_module::external_function()
}
18 changes: 9 additions & 9 deletions tests/main.sb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import "unicode"


fn main() {
log_test_stage("Running tests")
logger::log_test_stage("Running tests")

conditionals_main()
functions_main()
imports_main()
numbers_main()
structs_main()
types_main()
unicode_main()
conditionals::conditionals_main()
functions::functions_main()
imports::imports_main()
numbers::numbers_main()
structs::structs_main()
types::types_main()
unicode::unicode_main()

log_test_stage("Done!")
logger::log_test_stage("Done!")
}

0 comments on commit 44d45c8

Please sign in to comment.