Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestEmptyDecl (0.15 sec)

  1. src/go/printer/printer_test.go

    	}
    	if buf.Len() != 0 {
    		t.Errorf("unexpected Fprint output:\n%s", buf.Bytes())
    	}
    }
    
    // TestEmptyDecl tests that empty decls for const, var, import are printed with
    // valid syntax e.g "var ()" instead of just "var", which is invalid and cannot
    // be parsed.
    func TestEmptyDecl(t *testing.T) { // issue 63566
    	for _, tok := range []token.Token{token.IMPORT, token.CONST, token.TYPE, token.VAR} {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top