aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/run_tests.cpp4
-rw-r--r--test/self_hosted.zig16
2 files changed, 8 insertions, 12 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index d03d8d0d52..7941f40ab1 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -1173,7 +1173,7 @@ fn f() {
add_compile_fail_case("normal string with newline", R"SOURCE(
const foo = "a
b";
- )SOURCE", 1, ".tmp_source.zig:2:13: error: use raw string for multiline string literal");
+ )SOURCE", 1, ".tmp_source.zig:2:13: error: newline not allowed in string literal");
add_compile_fail_case("invalid comparison for function pointers", R"SOURCE(
fn foo() {}
@@ -1760,7 +1760,7 @@ struct type {
)SOURCE", 3,
R"(pub const FOO = c"aoeu\x13 derp")",
R"(pub const FOO2 = c"aoeu\x134 derp")",
- R"(pub const FOO_CHAR = '\x3f')");
+ R"(pub const FOO_CHAR = '?')");
}
static void run_self_hosted_test(bool is_release_mode) {
diff --git a/test/self_hosted.zig b/test/self_hosted.zig
index bb2eec814a..6c9fd2d5f5 100644
--- a/test/self_hosted.zig
+++ b/test/self_hosted.zig
@@ -684,17 +684,13 @@ fn count_trailing_zeroes() {
#attribute("test")
fn multiline_string() {
- const s1 = r"AOEU(
-one
-two)
-three)AOEU";
- const s2 = "\none\ntwo)\nthree";
- const s3 = r"(
-one
-two)
-three)";
+ const s1 =
+ \\one
+ \\two)
+ \\three
+ ;
+ const s2 = "one\ntwo)\nthree";
assert(str.eql(s1, s2));
- assert(str.eql(s3, s2));
}