Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TestReference (0.2 sec)

  1. pkg/config/analysis/diag/helper.go

    	return ""
    }
    
    func (o testOrigin) Reference() resource.Reference {
    	return o.ref
    }
    
    func (o testOrigin) FieldMap() map[string]int {
    	return o.fieldMap
    }
    
    type testReference struct {
    	name string
    }
    
    func (r testReference) String() string {
    	return r.name
    }
    
    func MockResource(name string) *resource.Instance {
    	return &resource.Instance{
    		Metadata: resource.Metadata{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 08:32:06 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. pkg/config/analysis/diag/message_test.go

    func TestMessageWithResource_String(t *testing.T) {
    	g := NewWithT(t)
    	mt := NewMessageType(Error, "IST-0042", "Cheese type not found: %q")
    	m := NewMessage(mt, &resource.Instance{Origin: testOrigin{name: "toppings/cheese", ref: testReference{"path/to/file"}}}, "Feta")
    
    	g.Expect(m.String()).To(Equal(`Error [IST-0042] (toppings/cheese path/to/file) Cheese type not found: "Feta"`))
    }
    
    func TestMessage_Unstructured(t *testing.T) {
    	g := NewWithT(t)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  3. pkg/slices/slices_test.go

    			}
    
    			for i := range got {
    				if got[i] != tc.want[i] {
    					t.Errorf("got %d, want %d", got[i], tc.want[i])
    				}
    			}
    		})
    	}
    }
    
    func TestReference(t *testing.T) {
    	type args[E any] struct {
    		s []E
    	}
    	type testCase[E any] struct {
    		name string
    		args args[E]
    		want []*E
    	}
    	stringTests := []testCase[string]{
    		{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 18.2K bytes
    - Viewed (0)
Back to top