Skip to content

Commit

Permalink
format error with %s
Browse files Browse the repository at this point in the history
  • Loading branch information
linhpn99 committed Apr 22, 2024
1 parent 0dd4b7f commit d5f9652
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/gno.land/p/demo/grc/grc721/nft_metadata_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestSetMetadata(t *testing.T) {

// Check if there was an error setting metadata
if derr != nil {
t.Errorf("Should not result in error ", derr.Error())
t.Errorf("Should not result in error : %s", derr.Error())
}

// Test case: Invalid token ID
Expand All @@ -69,7 +69,7 @@ func TestSetMetadata(t *testing.T) {

// Check if the error returned matches the expected error
if err != ErrInvalidTokenId {
t.Errorf("Expected error %v, got %v", ErrInvalidTokenId, err)
t.Errorf("Expected error %s, got %s", ErrInvalidTokenId, err)
}

// Set the original caller to addr2
Expand All @@ -90,7 +90,7 @@ func TestSetMetadata(t *testing.T) {

// Check if the error returned matches the expected error
if cerr != ErrCallerIsNotOwner {
t.Errorf("Expected error %v, got %v", ErrCallerIsNotOwner, cerr)
t.Errorf("Expected error %s, got %s", ErrCallerIsNotOwner, cerr)
}

// Set the original caller back to addr1
Expand All @@ -99,7 +99,7 @@ func TestSetMetadata(t *testing.T) {
// Retrieve metadata for token 1
dummyMetadata, err := dummy.TokenMetadata(TokenID("1"))
if err != nil {
t.Errorf("Metadata error: %v", err.Error())
t.Errorf("Metadata error: %s", err.Error())
} else {
// Check if metadata attributes match expected values
if dummyMetadata.Image != image {
Expand Down

0 comments on commit d5f9652

Please sign in to comment.