Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestIntJSONEncodingNil (0.14 sec)

  1. src/math/big/intmarsh_test.go

    				t.Errorf("unmarshaling of %s failed: %s", &tx, err)
    				continue
    			}
    			if rx.Cmp(&tx) != 0 {
    				t.Errorf("JSON encoding of %s failed: got %s want %s", &tx, &rx, &tx)
    			}
    		}
    	}
    }
    
    func TestIntJSONEncodingNil(t *testing.T) {
    	var x *Int
    	b, err := x.MarshalJSON()
    	if err != nil {
    		t.Fatalf("marshaling of nil failed: %s", err)
    	}
    	got := string(b)
    	want := "null"
    	if got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 07 23:27:14 UTC 2022
    - 3.1K bytes
    - Viewed (0)
Back to top