From: Brendan Hansen Date: Fri, 3 Dec 2021 21:40:02 +0000 (-0600) Subject: fixed caller_location test for windows X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=a6a59ca24bfce7346630c55fae5ea5f6388a3a4e;p=onyx.git fixed caller_location test for windows --- diff --git a/tests/caller_location.onyx b/tests/caller_location.onyx index 9e4a0737..ec628d09 100644 --- 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