Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ExactString (0.23 sec)

  1. src/go/types/eval_test.go

    		if gotStr != typStr {
    			t.Errorf("Eval(%q) got type %s, want %s", expr, gotStr, typStr)
    			return
    		}
    	}
    
    	// compare values
    	gotStr := ""
    	if gotTv.Value != nil {
    		gotStr = gotTv.Value.ExactString()
    	}
    	if gotStr != valStr {
    		t.Errorf("Eval(%q) got value %s, want %s", expr, gotStr, valStr)
    	}
    }
    
    func TestEvalBasic(t *testing.T) {
    	fset := token.NewFileSet()
    	for _, typ := range Typ[Bool : String+1] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 19:56:15 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. src/go/types/api_test.go

    			t.Errorf("package %s: got type %s; want %s", name, got, test.typ)
    			continue
    		}
    
    		// if we have a constant, check that value is correct
    		if tv.Value != nil {
    			if got := tv.Value.ExactString(); got != test.val {
    				t.Errorf("package %s: got value %s; want %s", name, got, test.val)
    			}
    		} else {
    			if test.val != "" {
    				t.Errorf("package %s: no constant found; want %s", name, test.val)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/api_test.go

    			t.Errorf("package %s: got type %s; want %s", name, got, test.typ)
    			continue
    		}
    
    		// if we have a constant, check that value is correct
    		if tv.Value != nil {
    			if got := tv.Value.ExactString(); got != test.val {
    				t.Errorf("package %s: got value %s; want %s", name, got, test.val)
    			}
    		} else {
    			if test.val != "" {
    				t.Errorf("package %s: no constant found; want %s", name, test.val)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
Back to top