Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestLastLineComment (0.34 sec)

  1. src/go/parser/parser_test.go

    			continue
    		}
    		const wantSel = "&{fmt _}"
    		if fmt.Sprint(sel) != wantSel {
    			t.Errorf("found selector %s, want %s", sel, wantSel)
    			continue
    		}
    	}
    }
    
    func TestLastLineComment(t *testing.T) {
    	const src = `package main
    type x int // comment
    `
    	fset := token.NewFileSet()
    	f, err := ParseFile(fset, "", src, ParseComments)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 24.6K bytes
    - Viewed (0)
Back to top