File tree Expand file tree Collapse file tree 1 file changed +0
-39
lines changed Expand file tree Collapse file tree 1 file changed +0
-39
lines changed Original file line number Diff line number Diff line change 11package assert
22
33import (
4- "os"
54 "testing"
65)
76
@@ -14,41 +13,3 @@ func TestNewAssertion(t *testing.T) {
1413 New (new (testing.T ))
1514 })
1615}
17-
18- func TestFailed (t * testing.T ) {
19- testFailed (t , func (a * Assertion ) {
20- // do nothing
21- }, false )
22- testFailed (t , func (a * Assertion ) {
23- a .Log ("test" )
24- }, false )
25- testFailed (t , func (a * Assertion ) {
26- a .Logf ("test" )
27- }, false )
28- testFailed (t , func (a * Assertion ) {
29- a .Error ("test" )
30- }, true )
31- testFailed (t , func (a * Assertion ) {
32- a .Errorf ("test" )
33- }, true )
34- testFailed (t , func (a * Assertion ) {
35- a .Fail ()
36- }, true )
37- }
38-
39- func testFailed (t * testing.T , f func (a * Assertion ), failed bool ) {
40- assert := New (new (testing.T ))
41-
42- f (assert )
43- DeepEqual (t , assert .Failed (), failed )
44- }
45-
46- func TestRun (t * testing.T ) {
47- assert := New (t )
48-
49- assert .Setenv ("env" , "assert test" )
50- assert .Run ("test Run" , func (t * testing.T ) {
51- DeepEqual (t , t .Name (), "TestRun/test_Run" )
52- DeepEqual (t , os .Getenv ("env" ), "assert test" )
53- })
54- }
You can’t perform that action at this time.
0 commit comments