feat(tinyssert): rename assert package to tinyssert
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# \[Tiny\] Assert
|
# Tiny Assert
|
||||||
|
|
||||||
A minimal assertion package, all in one single file that you can copy and paste
|
A minimal assertion package, all in one single file that you can copy and paste
|
||||||
to vendor-in and use without adding any dependencies to your project.
|
to vendor-in and use without adding any dependencies to your project.
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
//
|
//
|
||||||
// An original copy of this file can be found at http://forge.capytal.company/loreddev/x/assert/assert.go.
|
// An original copy of this file can be found at http://forge.capytal.company/loreddev/x/assert/assert.go.
|
||||||
|
|
||||||
// # [Tiny] Assert
|
// # Tiny Assert
|
||||||
//
|
//
|
||||||
// Minimal set of assertions functions for testing and simulation testing, all in
|
// Minimal set of assertions functions for testing and simulation testing, all in
|
||||||
// one file.
|
// one file.
|
||||||
@@ -25,13 +25,13 @@
|
|||||||
//
|
//
|
||||||
// import (
|
// import (
|
||||||
// "log"
|
// "log"
|
||||||
// "forge.capytal.company/loreddev/x/assert"
|
// "forge.capytal.company/loreddev/x/tinyssert"
|
||||||
// )
|
// )
|
||||||
//
|
//
|
||||||
// func main() {
|
// func main() {
|
||||||
// expected := "value"
|
// expected := "value"
|
||||||
// value := "value"
|
// value := "value"
|
||||||
// log.Println(assert.Equal(expected, value)) // "true"
|
// log.Println(tinyssert.Equal(expected, value)) // "true"
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// Or proverbially, you can create your own "assert" variable and have more control
|
// Or proverbially, you can create your own "assert" variable and have more control
|
||||||
@@ -41,18 +41,18 @@
|
|||||||
//
|
//
|
||||||
// import (
|
// import (
|
||||||
// "log/slog"
|
// "log/slog"
|
||||||
// "forge.capytal.company/loreddev/x/assert"
|
// "forge.capytal.company/loreddev/x/tinyssert"
|
||||||
// )
|
// )
|
||||||
//
|
//
|
||||||
// var logger = slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{}))
|
// var logger = slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{}))
|
||||||
// var assert = assert.NewAssertions(assert.Opts{Logger: logger})
|
// var assert = tinyssert.NewAssertions(assert.Opts{Logger: logger})
|
||||||
//
|
//
|
||||||
// func main() {
|
// func main() {
|
||||||
// expected := "value"
|
// expected := "value"
|
||||||
// value := "not value"
|
// value := "not value"
|
||||||
// assert.Equal(expected, value) // "expected \"value\", got \"not value\"" with the call stack and returns false
|
// assert.Equal(expected, value) // "expected \"value\", got \"not value\"" with the call stack and returns false
|
||||||
// }
|
// }
|
||||||
package assert
|
package tinyssert
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
Reference in New Issue
Block a user