diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-08-16 23:26:09 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-16 23:29:11 -0700 |
commit | fa32136ac0c3e3bfdb337ed727bedd7455abf68e (patch) | |
tree | 19b7bcc9cb1fcda699dbe20bf49ea6f054a5bd81 | |
parent | 6294a7a6ec6d0e4666f5413df6e59738d02fc12e (diff) |
Internal change.
PiperOrigin-RevId: 391217339
-rw-r--r-- | nogo.yaml | 2 | ||||
-rw-r--r-- | test/benchmarks/tools/fio_test.go | 2 | ||||
-rw-r--r-- | tools/go_generics/rules_tests/template_test.go | 6 |
3 files changed, 7 insertions, 3 deletions
@@ -48,6 +48,8 @@ global: - "duplicate import" # These will never be annotated. - "unexpected call to atomic function" + # Generated proto code creates declarations like 'var start int = iNdEx' + - "should omit type .* from declaration; it will be inferred from the right-hand side" internal: suppress: # We use ALL_CAPS for system definitions, diff --git a/test/benchmarks/tools/fio_test.go b/test/benchmarks/tools/fio_test.go index a98277150..3b1f852ce 100644 --- a/test/benchmarks/tools/fio_test.go +++ b/test/benchmarks/tools/fio_test.go @@ -86,7 +86,7 @@ func TestFio(t *testing.T) { fio := Fio{} // WriteBandwidth. got, err := fio.parseBandwidth(sampleData, false) - var want float64 = 1753471.0 * 1024 + want := 1753471.0 * 1024 if err != nil { t.Fatalf("parse failed with err: %v", err) } else if got != want { diff --git a/tools/go_generics/rules_tests/template_test.go b/tools/go_generics/rules_tests/template_test.go index b2a3446ef..6f4d140da 100644 --- a/tools/go_generics/rules_tests/template_test.go +++ b/tools/go_generics/rules_tests/template_test.go @@ -20,14 +20,16 @@ import ( ) func TestMax(t *testing.T) { - var a int = max(10, 20) + var a int + a = max(10, 20) if a != 20 { t.Errorf("Bad result of max, got %v, want %v", a, 20) } } func TestIntConst(t *testing.T) { - var a int = add(10) + var a int + a = add(10) if a != 30 { t.Errorf("Bad result of add, got %v, want %v", a, 30) } |