Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for World (0.16 sec)

  1. tests/main_test.go

    	if count1 != count2 {
    		t.Errorf("No user should not be deleted by invalid SQL")
    	}
    }
    
    func TestSetAndGet(t *testing.T) {
    	if value, ok := DB.Set("hello", "world").Get("hello"); !ok {
    		t.Errorf("Should be able to get setting after set")
    	} else if value.(string) != "world" {
    		t.Errorf("Set value should not be changed")
    	}
    
    	if _, ok := DB.Get("non_existing"); ok {
    		t.Errorf("Get non existing key should return error")
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 24 01:31:58 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  2. internal/grid/grid_test.go

    	remoteConn := local.Connection(remoteHost)
    	remoteConn.WaitForConnect(context.Background())
    	defer testlogger.T.SetErrorTB(t)()
    
    	t.Run("localToRemote", func(t *testing.T) {
    		const testPayload = "Hello Grid World!"
    
    		start := time.Now()
    		resp, err := remoteConn.Request(context.Background(), handlerTest, []byte(testPayload))
    		errFatal(err)
    		if string(resp) != testPayload {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 30 15:03:35 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  3. cmd/server_test.go

    	c.Assert(response.ContentLength, int64(len([]byte("hello world"))))
    	var buffer2 bytes.Buffer
    	// retrieve the contents of response body.
    	n, err := io.Copy(&buffer2, response.Body)
    	c.Assert(err, nil)
    	c.Assert(n, int64(len([]byte("hello world"))))
    	// asserted the contents of the fetched object with the expected result.
    	c.Assert(true, bytes.Equal(buffer2.Bytes(), []byte("hello world")))
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 108K bytes
    - Viewed (0)
  4. cmd/post-policy_test.go

    		{
    			objectName:         "test",
    			data:               []byte("Hello, World"),
    			expectedRespStatus: http.StatusForbidden,
    			accessKey:          "",
    			secretKey:          "",
    			malformedBody:      false,
    		},
    		// Bad case malformed input.
    		{
    			objectName:         "test",
    			data:               []byte("Hello, World"),
    			expectedRespStatus: http.StatusBadRequest,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  5. src/bytes/reader_test.go

    			t.Errorf("got string %q; want %q", b.String(), s)
    		}
    		if r.Len() != 0 {
    			t.Errorf("reader contains %v bytes; want 0", r.Len())
    		}
    	}
    }
    
    func TestReaderLen(t *testing.T) {
    	const data = "hello world"
    	r := NewReader([]byte(data))
    	if got, want := r.Len(), 11; got != want {
    		t.Errorf("r.Len(): got %d, want %d", got, want)
    	}
    	if n, err := r.Read(make([]byte, 10)); err != nil || n != 10 {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  6. tests/embedded_struct_test.go

    	DB.Migrator().DropTable(&HNPost{})
    	if err := DB.Migrator().AutoMigrate(&HNPost{}); err != nil {
    		t.Fatalf("failed to auto migrate, got error: %v", err)
    	}
    
    	hnPost := HNPost{Content: Content{Content: "hello world"}}
    
    	if err := DB.Create(&hnPost).Error; err != nil {
    		t.Errorf("Failed to create got error %v", err)
    	}
    }
    
    func TestEmbeddedRelations(t *testing.T) {
    	type EmbUser struct {
    		gorm.Model
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  7. src/builtin/builtin.go

    //
    //	slice = append(slice, elem1, elem2)
    //	slice = append(slice, anotherSlice...)
    //
    // As a special case, it is legal to append a string to a byte slice, like this:
    //
    //	slice = append([]byte("hello "), "world"...)
    func append(slice []Type, elems ...Type) []Type
    
    // The copy built-in function copies elements from a source slice into a
    // destination slice. (As a special case, it also will copy bytes from a
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. cmd/xl-storage_unix_test.go

    	if err = disk.AppendFile(context.Background(), testCase.volName, pathJoin("hello-world.txt", xlStorageFormatFile), []byte("Hello World")); err != nil {
    		t.Fatalf("Create a file `test` failed with %s expected to pass.", err)
    	}
    
    	// CheckFile - stat the file.
    	if _, err := disk.StatInfoFile(context.Background(), testCase.volName, "hello-world.txt/"+xlStorageFormatFile, false); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 25 19:37:26 GMT 2022
    - 3.4K bytes
    - Viewed (0)
  9. src/bytes/example_test.go

    	"io"
    	"os"
    	"sort"
    	"strconv"
    	"unicode"
    )
    
    func ExampleBuffer() {
    	var b bytes.Buffer // A Buffer needs no initialization.
    	b.Write([]byte("Hello "))
    	fmt.Fprintf(&b, "world!")
    	b.WriteTo(os.Stdout)
    	// Output: Hello world!
    }
    
    func ExampleBuffer_reader() {
    	// A Buffer can turn a string or a []byte into an io.Reader.
    	buf := bytes.NewBufferString("R29waGVycyBydWxlIQ==")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  10. misc/cgo/gmp/gmp.go

    Garbage collection is the big problem.  It is fine for the Go world to
    have pointers into the C world and to free those pointers when they
    are no longer needed.  To help, the Go code can define Go objects
    holding the C pointers and use runtime.SetFinalizer on those Go objects.
    
    It is much more difficult for the C world to have pointers into the Go
    world, because the Go garbage collector is unaware of the memory
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
Back to top