This repository was archived by the owner on Feb 17, 2025. It is now read-only.
File tree 4 files changed +17
-26
lines changed
4 files changed +17
-26
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,14 @@ All notable changes to this library are documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
6
6
and this library adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
- ## [ Unreleased] ( https://github.com/fluentassert/verify/compare/v1.0.0-rc.2...HEAD )
8
+ ## [ Unreleased] ( https://github.com/fluentassert/verify/compare/v1.0.0-rc.3...HEAD )
9
+
10
+ <!-- markdownlint-disable-next-line line-length -->
11
+ ## [ 1.0.0-rc.3] ( https://github.com/fluentassert/verify/releases/tag/v1.0.0-rc.3 ) - 2023-03-09
12
+
13
+ ### Removed
14
+
15
+ - Remove ` constraints ` package.
9
16
10
17
<!-- markdownlint-disable-next-line line-length -->
11
18
## [ 1.0.0-rc.2] ( https://github.com/fluentassert/verify/releases/tag/v1.0.0-rc.2 ) - 2023-02-24
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,17 +3,17 @@ package verify
3
3
import (
4
4
"fmt"
5
5
"math"
6
-
7
- "github.com/fluentassert/verify/constraints"
8
6
)
9
7
10
- // FluentNumber encapsulates assertions for numbers.
11
- type FluentNumber [T constraints.Number ] struct {
8
+ // FluentNumber encapsulates assertions for numbers
9
+ // that supports the operators < <= >= > + - * /.
10
+ type FluentNumber [T ~ int | ~ int8 | ~ int16 | ~ int32 | ~ int64 | ~ uint | ~ uint8 | ~ uint16 | ~ uint32 | ~ uint64 | ~ uintptr | ~ float32 | ~ float64 ] struct {
12
11
FluentOrdered [T ]
13
12
}
14
13
15
- // Number is used for testing numbers.
16
- func Number [T constraints.Number ](got T ) FluentNumber [T ] {
14
+ // Number is used for testing numbers
15
+ // that supports the operators < <= >= > + - * /.
16
+ func Number [T ~ int | ~ int8 | ~ int16 | ~ int32 | ~ int64 | ~ uint | ~ uint8 | ~ uint16 | ~ uint32 | ~ uint64 | ~ uintptr | ~ float32 | ~ float64 ](got T ) FluentNumber [T ] {
17
17
return FluentNumber [T ]{FluentOrdered [T ]{FluentObj [T ]{FluentAny [T ]{got }}}}
18
18
}
19
19
Original file line number Diff line number Diff line change @@ -2,19 +2,17 @@ package verify
2
2
3
3
import (
4
4
"fmt"
5
-
6
- "github.com/fluentassert/verify/constraints"
7
5
)
8
6
9
7
// FluentOrdered encapsulates assertions for ordered object
10
- // // that supports the operators < <= >= >.
11
- type FluentOrdered [T constraints. Ordered ] struct {
8
+ // that supports the operators < <= >= >.
9
+ type FluentOrdered [T ~ int | ~ int8 | ~ int16 | ~ int32 | ~ int64 | ~ uint | ~ uint8 | ~ uint16 | ~ uint32 | ~ uint64 | ~ uintptr | ~ float32 | ~ float64 | ~ string ] struct {
12
10
FluentObj [T ]
13
11
}
14
12
15
13
// Ordered is used for testing a ordered object
16
14
// that supports the operators < <= >= >.
17
- func Ordered [T constraints. Ordered ](got T ) FluentOrdered [T ] {
15
+ func Ordered [T ~ int | ~ int8 | ~ int16 | ~ int32 | ~ int64 | ~ uint | ~ uint8 | ~ uint16 | ~ uint32 | ~ uint64 | ~ uintptr | ~ float32 | ~ float64 | ~ string ](got T ) FluentOrdered [T ] {
18
16
return FluentOrdered [T ]{FluentObj [T ]{FluentAny [T ]{got }}}
19
17
}
20
18
You can’t perform that action at this time.
0 commit comments