| 1 | package assertscip-go gomod github.com/tj/assert . `github.com/tj/assert`/ |
| 2 | |
| 3 | import ( |
| 4 | "errorsscip-go gomod github.com/golang/go/src go1.14 errors/" |
| 5 | "testingscip-go gomod github.com/golang/go/src go1.14 testing/" |
| 6 | "timescip-go gomod github.com/golang/go/src go1.14 time/" |
| 7 | ) |
| 8 | |
| 9 | // AssertionTesterInterface defines an interface to be used for testing assertion methods |
| 10 | type AssertionTesterInterfacescip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterInterface# interface { |
| 11 | TestMethodscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterInterface#TestMethod.() |
| 12 | } |
| 13 | |
| 14 | // AssertionTesterConformingObject is an object that conforms to the AssertionTesterInterface interface |
| 15 | type AssertionTesterConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject# struct { |
| 16 | } |
| 17 | |
| 18 | func (a *AssertionTesterConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject#) TestMethodscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject#TestMethod().() { |
| 19 | } |
| 20 | |
| 21 | // AssertionTesterNonConformingObject is an object that does not conform to the AssertionTesterInterface interface |
| 22 | type AssertionTesterNonConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterNonConformingObject# struct { |
| 23 | } |
| 24 | |
| 25 | type MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT# struct { |
| 26 | Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. bool |
| 27 | } |
| 28 | |
| 29 | func (t *MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) FailNowscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#FailNow().() { |
| 30 | t.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. = true |
| 31 | } |
| 32 | |
| 33 | func (t *MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) Errorfscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Errorf().(format string, args ...interface{}) { |
| 34 | _, _ = format, args |
| 35 | } |
| 36 | |
| 37 | func TestImplementsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestImplements().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 38 | |
| 39 | Implementsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Implements().(t, (*AssertionTesterInterfacescip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterInterface#)(nil), new(AssertionTesterConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject#)) |
| 40 | |
| 41 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 42 | Implementsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Implements().(mockT, (*AssertionTesterInterfacescip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterInterface#)(nil), new(AssertionTesterNonConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterNonConformingObject#)) |
| 43 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 44 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestIsTypescip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestIsType().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 49 | |
| 50 | IsTypescip-go gomod github.com/tj/assert . `github.com/tj/assert`/IsType().(t, new(AssertionTesterConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject#), new(AssertionTesterConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject#)) |
| 51 | |
| 52 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 53 | IsTypescip-go gomod github.com/tj/assert . `github.com/tj/assert`/IsType().(mockT, new(AssertionTesterConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject#), new(AssertionTesterNonConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterNonConformingObject#)) |
| 54 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 55 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | func TestEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestEqual().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 60 | |
| 61 | Equalscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Equal().(t, 1, 1) |
| 62 | |
| 63 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 64 | Equalscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Equal().(mockT, 1, 2) |
| 65 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 66 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 67 | } |
| 68 | |
| 69 | } |
| 70 | |
| 71 | func TestNotEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestNotEqual().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 72 | |
| 73 | NotEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotEqual().(t, 1, 2) |
| 74 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 75 | NotEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotEqual().(mockT, 2, 2) |
| 76 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 77 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | func TestExactlyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestExactly().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 82 | |
| 83 | a := float32(1) |
| 84 | b := float32(1) |
| 85 | c := float64(1) |
| 86 | |
| 87 | Exactlyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Exactly().(t, a, b) |
| 88 | |
| 89 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 90 | Exactlyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Exactly().(mockT, a, c) |
| 91 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 92 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | func TestNotNilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestNotNil().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 97 | |
| 98 | NotNilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotNil().(t, new(AssertionTesterConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject#)) |
| 99 | |
| 100 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 101 | NotNilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotNil().(mockT, nil) |
| 102 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 103 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | func TestNilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestNil().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 108 | |
| 109 | Nilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Nil().(t, nil) |
| 110 | |
| 111 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 112 | Nilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Nil().(mockT, new(AssertionTesterConformingObjectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/AssertionTesterConformingObject#)) |
| 113 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 114 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | func TestTruescip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestTrue().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 119 | |
| 120 | Truescip-go gomod github.com/tj/assert . `github.com/tj/assert`/True().(t, true) |
| 121 | |
| 122 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 123 | Truescip-go gomod github.com/tj/assert . `github.com/tj/assert`/True().(mockT, false) |
| 124 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 125 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | func TestFalsescip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestFalse().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 130 | |
| 131 | Falsescip-go gomod github.com/tj/assert . `github.com/tj/assert`/False().(t, false) |
| 132 | |
| 133 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 134 | Falsescip-go gomod github.com/tj/assert . `github.com/tj/assert`/False().(mockT, true) |
| 135 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 136 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | func TestContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestContains().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 141 | |
| 142 | Containsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Contains().(t, "Hello World", "Hello") |
| 143 | |
| 144 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 145 | Containsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Contains().(mockT, "Hello World", "Salut") |
| 146 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 147 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | func TestNotContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestNotContains().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 152 | |
| 153 | NotContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotContains().(t, "Hello World", "Hello!") |
| 154 | |
| 155 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 156 | NotContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotContains().(mockT, "Hello World", "Hello") |
| 157 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 158 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | func TestPanicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestPanics().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 163 | |
| 164 | Panicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Panics().(t, func() { |
| 165 | panic("Panic!") |
| 166 | }) |
| 167 | |
| 168 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 169 | Panicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Panics().(mockT, func() {}) |
| 170 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 171 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | func TestNotPanicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestNotPanics().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 176 | |
| 177 | NotPanicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotPanics().(t, func() {}) |
| 178 | |
| 179 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 180 | NotPanicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotPanics().(mockT, func() { |
| 181 | panic("Panic!") |
| 182 | }) |
| 183 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 184 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | func TestNoErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestNoError().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 189 | |
| 190 | NoErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NoError().(t, nil) |
| 191 | |
| 192 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 193 | NoErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NoError().(mockT, errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("some error")) |
| 194 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 195 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | func TestErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestError().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 200 | |
| 201 | Errorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Error().(t, errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("some error")) |
| 202 | |
| 203 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 204 | Errorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Error().(mockT, nil) |
| 205 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 206 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | func TestEqualErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestEqualError().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 211 | |
| 212 | EqualErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/EqualError().(t, errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("some error"), "some error") |
| 213 | |
| 214 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 215 | EqualErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/EqualError().(mockT, errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("some error"), "Not some error") |
| 216 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 217 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | func TestEmptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestEmpty().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 222 | |
| 223 | Emptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Empty().(t, "") |
| 224 | |
| 225 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 226 | Emptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Empty().(mockT, "x") |
| 227 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 228 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | func TestNotEmptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestNotEmpty().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 233 | |
| 234 | NotEmptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotEmpty().(t, "x") |
| 235 | |
| 236 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 237 | NotEmptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotEmpty().(mockT, "") |
| 238 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 239 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | func TestWithinDurationscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestWithinDuration().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 244 | |
| 245 | a := timescip-go gomod github.com/golang/go/src go1.14 time/.Nowscip-go gomod github.com/golang/go/src go1.14 time/Now().() |
| 246 | b := a.Addscip-go gomod github.com/golang/go/src go1.14 time/Time#Add().(10 * timescip-go gomod github.com/golang/go/src go1.14 time/.Secondscip-go gomod github.com/golang/go/src go1.14 time/Second.) |
| 247 | |
| 248 | WithinDurationscip-go gomod github.com/tj/assert . `github.com/tj/assert`/WithinDuration().(t, a, b, 15*timescip-go gomod github.com/golang/go/src go1.14 time/.Secondscip-go gomod github.com/golang/go/src go1.14 time/Second.) |
| 249 | |
| 250 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 251 | WithinDurationscip-go gomod github.com/tj/assert . `github.com/tj/assert`/WithinDuration().(mockT, a, b, 5*timescip-go gomod github.com/golang/go/src go1.14 time/.Secondscip-go gomod github.com/golang/go/src go1.14 time/Second.) |
| 252 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 253 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | func TestInDeltascip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestInDelta().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 258 | |
| 259 | InDeltascip-go gomod github.com/tj/assert . `github.com/tj/assert`/InDelta().(t, 1.001, 1, 0.01) |
| 260 | |
| 261 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 262 | InDeltascip-go gomod github.com/tj/assert . `github.com/tj/assert`/InDelta().(mockT, 1, 2, 0.5) |
| 263 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 264 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | func TestZeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestZero().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 269 | |
| 270 | Zeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Zero().(t, "") |
| 271 | |
| 272 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 273 | Zeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Zero().(mockT, "x") |
| 274 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 275 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | func TestNotZeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestNotZero().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 280 | |
| 281 | NotZeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotZero().(t, "x") |
| 282 | |
| 283 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 284 | NotZeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotZero().(mockT, "") |
| 285 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 286 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | func TestJSONEq_EqualSONStringscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_EqualSONString().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 291 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 292 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, `{"hello": "world", "foo": "bar"}`, `{"hello": "world", "foo": "bar"}`) |
| 293 | if mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 294 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should pass") |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | func TestJSONEq_EquivalentButNotEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_EquivalentButNotEqual().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 299 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 300 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) |
| 301 | if mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 302 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should pass") |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | func TestJSONEq_HashOfArraysAndHashesscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_HashOfArraysAndHashes().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 307 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 308 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, "{\r\n\t\"numeric\": 1.5,\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]],\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\"\r\n}", |
| 309 | "{\r\n\t\"numeric\": 1.5,\r\n\t\"hash\": {\"nested\": \"hash\", \"nested_slice\": [\"this\", \"is\", \"nested\"]},\r\n\t\"string\": \"foo\",\r\n\t\"array\": [{\"foo\": \"bar\"}, 1, \"string\", [\"nested\", \"array\", 5.5]]\r\n}") |
| 310 | if mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 311 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should pass") |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | func TestJSONEq_Arrayscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_Array().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 316 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 317 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `["foo", {"nested": "hash", "hello": "world"}]`) |
| 318 | if mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 319 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should pass") |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | func TestJSONEq_HashAndArrayNotEquivalentscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_HashAndArrayNotEquivalent().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 324 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 325 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `{"foo": "bar", {"nested": "hash", "hello": "world"}}`) |
| 326 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 327 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | func TestJSONEq_HashesNotEquivalentscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_HashesNotEquivalent().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 332 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 333 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, `{"foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) |
| 334 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 335 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | func TestJSONEq_ActualIsNotJSONscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_ActualIsNotJSON().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 340 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 341 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, `{"foo": "bar"}`, "Not JSON") |
| 342 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 343 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | func TestJSONEq_ExpectedIsNotJSONscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_ExpectedIsNotJSON().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 348 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 349 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, "Not JSON", `{"foo": "bar", "hello": "world"}`) |
| 350 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 351 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | func TestJSONEq_ExpectedAndActualNotJSONscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_ExpectedAndActualNotJSON().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 356 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 357 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, "Not JSON", "Not JSON") |
| 358 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 359 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | func TestJSONEq_ArraysOfDifferentOrderscip-go gomod github.com/tj/assert . `github.com/tj/assert`/TestJSONEq_ArraysOfDifferentOrder().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { |
| 364 | mockT := new(MockTscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#) |
| 365 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(mockT, `["foo", {"hello": "world", "nested": "hash"}]`, `[{ "hello": "world", "nested": "hash"}, "foo"]`) |
| 366 | if !mockT.Failedscip-go gomod github.com/tj/assert . `github.com/tj/assert`/MockT#Failed. { |
| 367 | t.Errorscip-go gomod github.com/golang/go/src go1.14 testing/common#Error().("Check should fail") |
| 368 | } |
| 369 | } |