Files
go-cart-actor/id_test.go
2024-11-16 10:14:38 +01:00

20 lines
316 B
Go

package main
import (
"testing"
)
func TestIdGeneration(t *testing.T) {
// Generate a random ID
id := NewCartId()
// Generate a random ID
id2 := NewCartId()
// Compare the two IDs
if id == id2 {
t.Errorf("IDs are the same: %v == %v", id, id2)
} else {
t.Log("ID generation test passed", id, id2)
}
}