diff options
author | EuAndreh <eu@euandre.org> | 2025-05-03 19:41:19 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-05-03 19:41:19 -0300 |
commit | a6e6896309007fa1013bd51cee125ab8a75f282d (patch) | |
tree | f6839c339e9d282138a793488cd8ac23ca356ac6 /tests/benchmarks/string-roundtrip/guuid.go | |
parent | tests/guuid.go: Use os.Exit over assert when testing panic (diff) | |
download | uuid-a6e6896309007fa1013bd51cee125ab8a75f282d.tar.gz uuid-a6e6896309007fa1013bd51cee125ab8a75f282d.tar.xz |
re s/guuid/uuid/g
Diffstat (limited to 'tests/benchmarks/string-roundtrip/guuid.go')
-rw-r--r-- | tests/benchmarks/string-roundtrip/guuid.go | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/benchmarks/string-roundtrip/guuid.go b/tests/benchmarks/string-roundtrip/guuid.go deleted file mode 100644 index 9fef55c..0000000 --- a/tests/benchmarks/string-roundtrip/guuid.go +++ /dev/null @@ -1,37 +0,0 @@ -package guuid - -import ( - "flag" - "fmt" -) - - - -var nFlag = flag.Int( - "n", - 10_000_000, - "The number of iterations to execute", -) - -func MainTest() { - flag.Parse() - n := *nFlag - - uuid := New() - - for i := 0; i < n; i++ { - derived, err := FromString(uuid.String()) - if err != nil { - panic(err) - } - - eq := uuid == derived - if !eq { - panic(fmt.Sprintf( - "bad round trip: orig (%#v); derived (%#v)", - uuid, - derived, - )) - } - } -} |