Commit 5f5dcfbc authored by Robert Griesemer's avatar Robert Griesemer

- gofmt these files

- remove use of implicit string concatenation
- these appear to be the only files correctly compiling under test
  that used implicit string concatenation

R=rsc
https://golang.org/cl/172043
parent 2e4334eb
This diff is collapsed.
......@@ -162,12 +162,12 @@ func main() {
AccumulateProbabilities(homosapiens);
alu := strings.Bytes(
"GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG"
"GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA"
"CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT"
"ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA"
"GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG"
"AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC"
"GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG" +
"GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA" +
"CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT" +
"ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA" +
"GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG" +
"AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC" +
"AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA");
out.WriteString(">ONE Homo sapiens alu\n");
......
......@@ -8,7 +8,7 @@ package main
import "os"
var ecode int;
var ecode int
func assert(a, b, c string) {
if a != b {
......@@ -16,19 +16,19 @@ func assert(a, b, c string) {
print("FAIL: ", c, ": ", a, "!=", b, "\n");
var max int = len(a);
if len(b) > max {
max = len(b);
max = len(b)
}
for i := 0; i < max; i++ {
ac := 0;
bc := 0;
if i < len(a) {
ac = int(a[i]);
ac = int(a[i])
}
if i < len(b) {
bc = int(b[i]);
bc = int(b[i])
}
if ac != bc {
print("\ta[", i, "] = ", ac, "; b[", i, "] =", bc, "\n");
print("\ta[", i, "] = ", ac, "; b[", i, "] =", bc, "\n")
}
}
}
......@@ -37,25 +37,25 @@ func assert(a, b, c string) {
func main() {
ecode = 0;
s :=
""
" "
"'`"
"a"
"ä"
"本"
"\a\b\f\n\r\t\v\\\""
"\000\123\x00\xca\xFE\u0123\ubabe\U0000babe"
"" +
" " +
"'`" +
"a" +
"ä" +
"本" +
"\a\b\f\n\r\t\v\\\"" +
"\000\123\x00\xca\xFE\u0123\ubabe\U0000babe" +
`` +
` ` +
`'"` +
`a` +
`ä` +
`本` +
`\a\b\f\n\r\t\v\\\'` +
`\000\123\x00\xca\xFE\u0123\ubabe\U0000babe` +
`\x\u\U\`;
``
` `
`'"`
`a`
`ä`
`本`
`\a\b\f\n\r\t\v\\\'`
`\000\123\x00\xca\xFE\u0123\ubabe\U0000babe`
`\x\u\U\`
;
assert("", ``, "empty");
assert(" ", " ", "blank");
assert("\x61", "a", "lowercase a");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment