From a6a59ca24bfce7346630c55fae5ea5f6388a3a4e Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Fri, 3 Dec 2021 15:40:02 -0600 Subject: [PATCH] fixed caller_location test for windows --- tests/caller_location.onyx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.25.1