summaryrefslogtreecommitdiff
path: root/src/lib/strconv/quote_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/strconv/quote_test.go')
-rw-r--r--src/lib/strconv/quote_test.go96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/lib/strconv/quote_test.go b/src/lib/strconv/quote_test.go
index 8421fcde4..06d72f753 100644
--- a/src/lib/strconv/quote_test.go
+++ b/src/lib/strconv/quote_test.go
@@ -14,14 +14,14 @@ type quoteTest struct {
out string;
}
-var quotetests = []quoteTest {
- quoteTest{ "\a\b\f\r\n\t\v", `"\a\b\f\r\n\t\v"` },
- quoteTest{ "\\", `"\\"` },
- quoteTest{ "abc\xffdef", `"abc\xffdef"` },
- quoteTest{ "\u263a", `"\u263a"` },
- quoteTest{ "\U0010ffff", `"\U0010ffff"` },
- quoteTest{ "\x04", `"\x04"` },
-}
+var quotetests = []quoteTest (
+ quoteTest( "\a\b\f\r\n\t\v", `"\a\b\f\r\n\t\v"` ),
+ quoteTest( "\\", `"\\"` ),
+ quoteTest( "abc\xffdef", `"abc\xffdef"` ),
+ quoteTest( "\u263a", `"\u263a"` ),
+ quoteTest( "\U0010ffff", `"\U0010ffff"` ),
+ quoteTest( "\x04", `"\x04"` ),
+)
func TestQuote(t *testing.T) {
for i := 0; i < len(quotetests); i++ {
@@ -37,46 +37,46 @@ type canBackquoteTest struct {
out bool;
}
-var canbackquotetests = []canBackquoteTest {
- canBackquoteTest{ "`", false },
- canBackquoteTest{ string(0), false },
- canBackquoteTest{ string(1), false },
- canBackquoteTest{ string(2), false },
- canBackquoteTest{ string(3), false },
- canBackquoteTest{ string(4), false },
- canBackquoteTest{ string(5), false },
- canBackquoteTest{ string(6), false },
- canBackquoteTest{ string(7), false },
- canBackquoteTest{ string(8), false },
- canBackquoteTest{ string(9), false },
- canBackquoteTest{ string(10), false },
- canBackquoteTest{ string(11), false },
- canBackquoteTest{ string(12), false },
- canBackquoteTest{ string(13), false },
- canBackquoteTest{ string(14), false },
- canBackquoteTest{ string(15), false },
- canBackquoteTest{ string(16), false },
- canBackquoteTest{ string(17), false },
- canBackquoteTest{ string(18), false },
- canBackquoteTest{ string(19), false },
- canBackquoteTest{ string(20), false },
- canBackquoteTest{ string(21), false },
- canBackquoteTest{ string(22), false },
- canBackquoteTest{ string(23), false },
- canBackquoteTest{ string(24), false },
- canBackquoteTest{ string(25), false },
- canBackquoteTest{ string(26), false },
- canBackquoteTest{ string(27), false },
- canBackquoteTest{ string(28), false },
- canBackquoteTest{ string(29), false },
- canBackquoteTest{ string(30), false },
- canBackquoteTest{ string(31), false },
- canBackquoteTest{ `' !"#$%&'()*+,-./:;<=>?@[\]^_{|}~`, true },
- canBackquoteTest{ `0123456789`, true },
- canBackquoteTest{ `ABCDEFGHIJKLMNOPQRSTUVWXYZ`, true },
- canBackquoteTest{ `abcdefghijklmnopqrstuvwxyz`, true },
- canBackquoteTest{ `☺`, true },
-}
+var canbackquotetests = []canBackquoteTest (
+ canBackquoteTest( "`", false ),
+ canBackquoteTest( string(0), false ),
+ canBackquoteTest( string(1), false ),
+ canBackquoteTest( string(2), false ),
+ canBackquoteTest( string(3), false ),
+ canBackquoteTest( string(4), false ),
+ canBackquoteTest( string(5), false ),
+ canBackquoteTest( string(6), false ),
+ canBackquoteTest( string(7), false ),
+ canBackquoteTest( string(8), false ),
+ canBackquoteTest( string(9), false ),
+ canBackquoteTest( string(10), false ),
+ canBackquoteTest( string(11), false ),
+ canBackquoteTest( string(12), false ),
+ canBackquoteTest( string(13), false ),
+ canBackquoteTest( string(14), false ),
+ canBackquoteTest( string(15), false ),
+ canBackquoteTest( string(16), false ),
+ canBackquoteTest( string(17), false ),
+ canBackquoteTest( string(18), false ),
+ canBackquoteTest( string(19), false ),
+ canBackquoteTest( string(20), false ),
+ canBackquoteTest( string(21), false ),
+ canBackquoteTest( string(22), false ),
+ canBackquoteTest( string(23), false ),
+ canBackquoteTest( string(24), false ),
+ canBackquoteTest( string(25), false ),
+ canBackquoteTest( string(26), false ),
+ canBackquoteTest( string(27), false ),
+ canBackquoteTest( string(28), false ),
+ canBackquoteTest( string(29), false ),
+ canBackquoteTest( string(30), false ),
+ canBackquoteTest( string(31), false ),
+ canBackquoteTest( `' !"#$%&'()*+,-./:;<=>?@[\]^_{|}~`, true ),
+ canBackquoteTest( `0123456789`, true ),
+ canBackquoteTest( `ABCDEFGHIJKLMNOPQRSTUVWXYZ`, true ),
+ canBackquoteTest( `abcdefghijklmnopqrstuvwxyz`, true ),
+ canBackquoteTest( `☺`, true ),
+)
func TestCanBackquote(t *testing.T) {
for i := 0; i < len(canbackquotetests); i++ {