projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
110dfa4
)
fixed caller_location test for windows
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Fri, 3 Dec 2021 21:40:02 +0000
(15:40 -0600)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Fri, 3 Dec 2021 21:40:02 +0000
(15:40 -0600)
tests/caller_location.onyx
patch
|
blob
|
history
diff --git
a/tests/caller_location.onyx
b/tests/caller_location.onyx
index 9e4a07375923d7b668e608259aca4d3d835bef9b..ec628d098976f72624b3c13f0dec8942342f734c 100644
(file)
--- a/
tests/caller_location.onyx
+++ b/
tests/caller_location.onyx
@@
-4,7
+4,7
@@
use package core
using_callsite :: (value: $T, site := #callsite) {
println(value);
- path := string.split(site.file,
#char "/"
);
+ path := string.split(site.file,
~~(#char "\\" if runtime.OS == runtime.OS_Windows else #char "/")
);
printf("I was called from {}:{}:{}\n", path[path.count - 1], site.line, site.column);
}
@@
-23,4
+23,6
@@
Something :: struct {
method :: (use s: ^Something) {
using_callsite(member);
}
-}
\ No newline at end of file
+}
+
+#local runtime :: package runtime