Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 44 for TC (0.11 sec)

  1. internal/s3select/sql/jsonpath_test.go

    		{"s.publicationHistory[0].pages", []interface{}{256.0, 336.0, Missing{}}},
    	}
    	for i, tc := range cases {
    		t.Run(tc.str, func(t *testing.T) {
    			jp := JSONPath{}
    			err := p.ParseString(tc.str, &jp)
    			// fmt.Println(jp)
    			if err != nil {
    				t.Fatalf("parse failed!: %d %v %s", i, err, tc)
    			}
    
    			// Read only the first json object from the file
    			recs, err := getJSONStructs(b)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  2. cmd/http-tracer.go

    		tc, ok := r.Context().Value(mcontext.ContextTraceKey).(*mcontext.TraceCtxt)
    		if !ok {
    			// Tracing is not enabled for this request
    			f.ServeHTTP(w, r)
    			return
    		}
    
    		tc.FuncName = getOpName(runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name())
    		tc.RequestRecorder.LogBody = logBody
    		tc.ResponseRecorder.LogAllBody = logBody
    		tc.ResponseRecorder.LogErrBody = true
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  3. src/bytes/bytes_test.go

    }
    
    func TestIndexFunc(t *testing.T) {
    	for _, tc := range indexFuncTests {
    		first := IndexFunc([]byte(tc.in), tc.f.f)
    		if first != tc.first {
    			t.Errorf("IndexFunc(%q, %s) = %d; want %d", tc.in, tc.f.name, first, tc.first)
    		}
    		last := LastIndexFunc([]byte(tc.in), tc.f.f)
    		if last != tc.last {
    			t.Errorf("LastIndexFunc(%q, %s) = %d; want %d", tc.in, tc.f.name, last, tc.last)
    		}
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  4. internal/bucket/lifecycle/noncurrentversion_test.go

    				NoncurrentDays:          0,
    				NewerNoncurrentVersions: 5,
    				set:                     true,
    			},
    			err: nil,
    		},
    	}
    
    	for i, tc := range testcases {
    		if got := tc.n.Validate(); got != tc.err {
    			t.Fatalf("%d: expected %v but got %v", i+1, tc.err, got)
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Dec 14 17:41:44 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  5. istioctl/pkg/tag/tag_test.go

    			skipConfirmation: false,
    			error:            "",
    		},
    	}
    
    	for _, tc := range tcs {
    		t.Run(tc.name, func(t *testing.T) {
    			var out bytes.Buffer
    			client := fake.NewSimpleClientset(tc.webhooksBefore.DeepCopyObject(), tc.namespaces.DeepCopyObject())
    			err := removeTag(context.Background(), client, tc.tag, tc.skipConfirmation, &out)
    			if tc.error == "" && err != nil {
    				t.Fatalf("expected no error, got %v", err)
    			}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Nov 17 22:41:06 GMT 2023
    - 8.7K bytes
    - Viewed (0)
  6. cmd/bucket-lifecycle_test.go

    			expectedErr:    errRestoreHDRMalformed,
    		},
    	}
    	for i, tc := range testCases {
    		actual, err := parseRestoreObjStatus(tc.restoreHdr)
    		if err != tc.expectedErr {
    			t.Fatalf("Test %d: got %v expected %v", i+1, err, tc.expectedErr)
    		}
    		if actual != tc.expectedStatus {
    			t.Fatalf("Test %d: got %v expected %v", i+1, actual, tc.expectedStatus)
    		}
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 31 09:57:57 GMT 2022
    - 7K bytes
    - Viewed (0)
  7. callbacks/helper_test.go

    				Columns: []clause.Column{{Name: "active"}},
    				Values:  [][]interface{}{{true}},
    			},
    		},
    	}
    
    	for _, tc := range testCase {
    		t.Run(tc.name, func(t *testing.T) {
    			actual := ConvertMapToValuesForCreate(&gorm.Statement{}, tc.input)
    			if !reflect.DeepEqual(actual, tc.expect) {
    				t.Errorf("expect %v got %v", tc.expect, actual)
    			}
    		})
    	}
    }
    
    func TestConvertSliceOfMapToValuesForCreate(t *testing.T) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 05 02:22:57 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  8. internal/bucket/encryption/bucket-sse-config_test.go

    			}
    			continue
    		}
    
    		if tc.keyID != "" && tc.keyID != ssec.KeyID() {
    			t.Errorf("Test case %d: Expected bucket encryption KeyID %s but got %s", i+1, tc.keyID, ssec.KeyID())
    		}
    
    		if expectedXML, err := xml.Marshal(tc.expectedConfig); err != nil || !bytes.Equal(expectedXML, []byte(tc.inputXML)) {
    			t.Errorf("Test case %d: Expected bucket encryption XML %s but got %s", i+1, string(expectedXML), tc.inputXML)
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 16 18:28:30 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  9. internal/s3select/sql/stringfuncs_contrib_test.go

    		{"abcd", 999, 999, "", nil},
    		{"", 999, 999, "", nil},
    		{"测试abc", 1, 1, "测", nil},
    		{"测试abc", 5, 5, "c", nil},
    	}
    
    	for i, tc := range evalCases {
    		res, err := evalSQLSubstring(tc.s, tc.startIdx, tc.length)
    		if res != tc.resExpected || err != tc.errExpected {
    			t.Errorf("Eval Case %d failed: %v %v", i, res, err)
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.2K bytes
    - Viewed (0)
  10. internal/s3select/sql/timestampfuncs_test.go

    	}
    	for i, tc := range cases {
    		tval, err := parseSQLTimestamp(tc.s)
    		if err != nil {
    			t.Errorf("Case %d: Unexpected error: %v", i+1, err)
    			continue
    		}
    		if !tval.Equal(tc.t) {
    			t.Errorf("Case %d: Expected %v got %v", i+1, tc.t, tval)
    			continue
    		}
    
    		tstr := FormatSQLTimestamp(tc.t)
    		if tstr != tc.s {
    			t.Errorf("Case %d: Expected %s got %s", i+1, tc.s, tstr)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.2K bytes
    - Viewed (0)
Back to top