Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for testappendix (0.23 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/appendixa_test.go

    	"github.com/google/go-cmp/cmp"
    )
    
    // TestAppendixA roundtrips the examples of encoded CBOR data items in RFC 8949 Appendix A. For
    // completeness, all examples from the appendix are included, even those those that are rejected by
    // this decoder or are re-encoded to a different sequence of CBOR bytes (with explanation).
    func TestAppendixA(t *testing.T) {
    	hex := func(h string) []byte {
    		b, err := hex.DecodeString(h)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 15 18:59:36 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/lang/StringUtilTest.java

         */
        @Test
        public void testToHex2() throws Exception {
            assertEquals("0001", StringUtil.toHex(1));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testAppendHex() throws Exception {
            final StringBuilder buf = new StringBuilder();
            StringUtil.appendHex(buf, (byte) 1);
            assertEquals("01", buf.toString());
        }
    
        /**
         * @throws Exception
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 12K bytes
    - Viewed (0)
  3. src/fmt/fmt_test.go

    	hello        = "hello "
    )
    
    func TestAppendf(t *testing.T) {
    	b := make([]byte, 100)
    	b = b[:copy(b, hello)]
    	got := Appendf(b, "world, %d", 23)
    	if string(got) != appendResult {
    		t.Fatalf("Appendf returns %q not %q", got, appendResult)
    	}
    	if &b[0] != &got[0] {
    		t.Fatalf("Appendf allocated a new slice")
    	}
    }
    
    func TestAppend(t *testing.T) {
    	b := make([]byte, 100)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:31:55 UTC 2024
    - 58.6K bytes
    - Viewed (0)
  4. src/time/format_test.go

    		if f.time.Format(RFC3339) != f.formattedValue {
    			t.Error("RFC3339:")
    			t.Errorf("  want=%+v", f.formattedValue)
    			t.Errorf("  have=%+v", f.time.Format(RFC3339))
    		}
    	}
    }
    
    func TestAppendInt(t *testing.T) {
    	tests := []struct {
    		in    int
    		width int
    		want  string
    	}{
    		{0, 0, "0"},
    		{0, 1, "0"},
    		{0, 2, "00"},
    		{0, 3, "000"},
    		{1, 0, "1"},
    		{1, 1, "1"},
    		{1, 2, "01"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:58:29 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  5. src/os/os_test.go

    		t.Fatalf("WriteString: %d, %v", n, err)
    	}
    	f.Close()
    	data, err := ReadFile(fname)
    	if err != nil {
    		t.Fatalf("ReadFile: %v", err)
    	}
    	return string(data)
    }
    
    func TestAppend(t *testing.T) {
    	defer chtmpdir(t)()
    	const f = "append.txt"
    	s := writeFile(t, f, O_CREATE|O_TRUNC|O_RDWR, "new")
    	if s != "new" {
    		t.Fatalf("writeFile: have %q want %q", s, "new")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  6. src/reflect/all_test.go

    	{nil, []int{22}},
    	{[]int{}, []int{22}},
    	{make([]int, 2, 4), nil},
    	{make([]int, 2, 4), []int{}},
    	{make([]int, 2, 4), []int{22}},
    	{make([]int, 2, 4), []int{22, 33, 44}},
    }
    
    func TestAppend(t *testing.T) {
    	for i, test := range appendTests {
    		origLen, extraLen := len(test.orig), len(test.extra)
    		want := append(test.orig, test.extra...)
    		// Convert extra from []int to []Value.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top