(t *testing.T)
| 119 | } |
| 120 | |
| 121 | func TestStringQuoted(t *testing.T) { |
| 122 | ver := runtime.Version() |
| 123 | if strings.Contains(ver, "go1.3") || strings.Contains(ver, "go1.2") { |
| 124 | t.Skipf("Test requires go v1.4 or later, this is %s", ver) |
| 125 | } |
| 126 | |
| 127 | testStrQuoted(t, "\x12 escaped control character") |
| 128 | testStrQuoted(t, `\u0012 escaped control character`) |
| 129 | testStrQuoted(t, ", one-byte UTF-8") |
| 130 | testStrQuoted(t, `\u002c one-byte UTF-8`) |
| 131 | testStrQuoted(t, "2ħ籦ö嗏ʑ>嫀") |
| 132 | testStrQuoted(t, `2ħ籦ö嗏ʑ\u003e嫀`) |
| 133 | testStrQuoted(t, "ģ two-byte UTF-8") |
| 134 | testStrQuoted(t, `\u0123 two-byte UTF-8`) |
| 135 | testStrQuoted(t, "ࠡ three-byte UTF-8") |
| 136 | testStrQuoted(t, `\u0821 three-byte UTF-8`) |
| 137 | testStrQuoted(t, `"\`+"\b\f\n\r\t") |
| 138 | testStrQuoted(t, "𝄞 surrogate, four-byte UTF-8") |
| 139 | testStrQuoted(t, string('\xff')+` <- xFF byte`) |
| 140 | testStrQuoted(t, `€þıœəßð some utf-8 ĸʒ×ŋµåäö𝄞`) |
| 141 | testStrQuoted(t, `\/`) |
| 142 | testStrQuoted(t, `/`) |
| 143 | testStrQuoted(t, `\"\\\b\f\n\r\t`) |
| 144 | testStrQuoted(t, `\uD834\uDD1E surrogate, four-byte UTF-8`) |
| 145 | testStrQuoted(t, `null`) |
| 146 | } |
| 147 | |
| 148 | func testStrQuoted(t *testing.T, str string) { |
| 149 | testCycle(t, &TstringTagged{X: str}, &XstringTagged{X: str}) |
nothing calls this directly
no test coverage detected
searching dependent graphs…