aboutsummaryrefslogtreecommitdiff
path: root/core/testing
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2023-06-23 12:11:46 +0100
committerGitHub <noreply@github.com>2023-06-23 12:11:46 +0100
commit9841b11a5423e2cba67c19fbd06e28732d36109c (patch)
tree7c067cbc1501c4a044a80944ca282dd7da974074 /core/testing
parent5a6d5374d780e726be82f3576b4f647d9096d012 (diff)
parentc48057081e451c81524c7727ec3ccf434a45726f (diff)
Merge pull request #2597 from odin-lang/ordered-named-arguments
Allowing for Positional and Named Arguments in Procedure Calls
Diffstat (limited to 'core/testing')
-rw-r--r--core/testing/runner_windows.odin2
-rw-r--r--core/testing/testing.odin10
2 files changed, 6 insertions, 6 deletions
diff --git a/core/testing/runner_windows.odin b/core/testing/runner_windows.odin
index 525eae685..17bcfce26 100644
--- a/core/testing/runner_windows.odin
+++ b/core/testing/runner_windows.odin
@@ -191,7 +191,7 @@ run_internal_test :: proc(t: ^T, it: Internal_Test) {
global_exception_handler = win32.AddVectoredExceptionHandler(0, exception_handler_proc)
context.assertion_failure_proc = proc(prefix, message: string, loc: runtime.Source_Code_Location) -> ! {
- errorf(t=global_current_t, format="%s %s", args={prefix, message}, loc=loc)
+ errorf(global_current_t, "%s %s", prefix, message, loc=loc)
intrinsics.trap()
}
diff --git a/core/testing/testing.odin b/core/testing/testing.odin
index 37f9fe4d9..0ceb58e33 100644
--- a/core/testing/testing.odin
+++ b/core/testing/testing.odin
@@ -46,15 +46,15 @@ errorf :: proc(t: ^T, format: string, args: ..any, loc := #caller_location) {
}
fail :: proc(t: ^T, loc := #caller_location) {
- error(t=t, args={"FAIL"}, loc=loc)
+ error(t, "FAIL", loc=loc)
t.error_count += 1
}
fail_now :: proc(t: ^T, msg := "", loc := #caller_location) {
if msg != "" {
- error(t=t, args={"FAIL:", msg}, loc=loc)
+ error(t, "FAIL:", msg, loc=loc)
} else {
- error(t=t, args={"FAIL"}, loc=loc)
+ error(t, "FAIL", loc=loc)
}
t.error_count += 1
if t._fail_now != nil {
@@ -84,14 +84,14 @@ cleanup :: proc(t: ^T, procedure: proc(rawptr), user_data: rawptr) {
expect :: proc(t: ^T, ok: bool, msg: string = "", loc := #caller_location) -> bool {
if !ok {
- error(t=t, args={msg}, loc=loc)
+ error(t, msg, loc=loc)
}
return ok
}
expect_value :: proc(t: ^T, value, expected: $T, loc := #caller_location) -> bool where intrinsics.type_is_comparable(T) {
ok := value == expected
if !ok {
- errorf(t=t, format="expected %v, got %v", args={expected, value}, loc=loc)
+ errorf(t, "expected %v, got %v", expected, value, loc=loc)
}
return ok
}