✏️ in test error
This commit is contained in:
parent
5545dc9e12
commit
3f19aeba5c
1 changed files with 7 additions and 7 deletions
|
@ -14,30 +14,30 @@ func TestParseExpirationMissing(t *testing.T) { // test parseExpirationFull with
|
|||
result, _ := ParseExpiration("1h47s")
|
||||
correctValue := 3647
|
||||
if result != correctValue {
|
||||
t.Fatal("Error in parseExpirationFull, want : ", correctValue, "got : ", result)
|
||||
t.Fatal("Error in ParseExpirationFull, want : ", correctValue, "got : ", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseExpirationNull(t *testing.T) { // test parseExpirationFull with all valid separator
|
||||
func TestParseExpirationNull(t *testing.T) { // test ParseExpirationFull with all valid separator
|
||||
result, _ := ParseExpiration("0")
|
||||
correctValue := 0
|
||||
if result != correctValue {
|
||||
t.Fatal("Error in parseExpirationFull, want : ", correctValue, "got : ", result)
|
||||
t.Fatal("Error in ParseExpirationFull, want : ", correctValue, "got : ", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseExpirationNegative(t *testing.T) { // test parseExpirationFull with all valid separator
|
||||
func TestParseExpirationNegative(t *testing.T) { // test ParseExpirationFull with all valid separator
|
||||
result, _ := ParseExpiration("-42h1m4s")
|
||||
correctValue := -1
|
||||
if result != correctValue {
|
||||
t.Fatal("Error in parseExpirationFull, want : ", correctValue, "got : ", result)
|
||||
t.Fatal("Error in ParseExpirationFull, want : ", correctValue, "got : ", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseExpirationInvalid(t *testing.T) { // test parseExpirationFull with all valid separator
|
||||
func TestParseExpirationInvalid(t *testing.T) { // test ParseExpirationFull with all valid separator
|
||||
result, _ := ParseExpiration("8h42h1m1d4s")
|
||||
correctValue := -1
|
||||
if result != correctValue {
|
||||
t.Fatal("Error in parseExpirationFull, want : ", correctValue, "got : ", result)
|
||||
t.Fatal("Error in ParseExpirationFull, want : ", correctValue, "got : ", result)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue