@@ -12,9 +12,9 @@ func TestTo(t *testing.T) {
12
12
v := true
13
13
pv := pointer .To (v )
14
14
if pv == nil {
15
- t .Fatal ("expected non-nil pointer" )
15
+ t .Error ("expected non-nil pointer" )
16
16
} else if v != * pv {
17
- t .Fatalf ("expected %v, got %v" , v , * pv )
17
+ t .Errorf ("expected %v, got %v" , v , * pv )
18
18
}
19
19
}
20
20
@@ -26,7 +26,7 @@ func TestFrom(t *testing.T) {
26
26
pv := new (bool )
27
27
v := pointer .From (pv )
28
28
if v != * pv {
29
- t .Fatalf ("expected %v, got %v" , * pv , v )
29
+ t .Errorf ("expected %v, got %v" , * pv , v )
30
30
}
31
31
})
32
32
@@ -36,7 +36,7 @@ func TestFrom(t *testing.T) {
36
36
var pv * bool
37
37
v := pointer .From (pv )
38
38
if v != e {
39
- t .Fatalf ("expected %v, got %v" , e , v )
39
+ t .Errorf ("expected %v, got %v" , e , v )
40
40
}
41
41
})
42
42
}
@@ -49,7 +49,7 @@ func TestToOrNil(t *testing.T) {
49
49
var v string
50
50
pv := pointer .ToOrNil (v )
51
51
if pv != nil {
52
- t .Fatalf ("expected nil pointer, got %v" , pv )
52
+ t .Errorf ("expected nil pointer, got %v" , pv )
53
53
}
54
54
})
55
55
@@ -58,9 +58,9 @@ func TestToOrNil(t *testing.T) {
58
58
v := "non-zero"
59
59
pv := pointer .ToOrNil (v )
60
60
if pv == nil {
61
- t .Fatal ("expected non-nil pointer" )
61
+ t .Error ("expected non-nil pointer" )
62
62
} else if v != * pv {
63
- t .Fatalf ("expected %v, got %v" , v , * pv )
63
+ t .Errorf ("expected %v, got %v" , v , * pv )
64
64
}
65
65
})
66
66
@@ -69,9 +69,9 @@ func TestToOrNil(t *testing.T) {
69
69
v := time .Date (2014 , 6 , 25 , 12 , 24 , 40 , 0 , time .UTC )
70
70
pv := pointer .ToOrNil (v )
71
71
if pv == nil {
72
- t .Fatal ("expected non-nil pointer" )
72
+ t .Error ("expected non-nil pointer" )
73
73
} else if v != * pv {
74
- t .Fatalf ("expected %v, got %v" , v , * pv )
74
+ t .Errorf ("expected %v, got %v" , v , * pv )
75
75
}
76
76
})
77
77
@@ -80,7 +80,7 @@ func TestToOrNil(t *testing.T) {
80
80
v := time.Time {}
81
81
pv := pointer .ToOrNil (v )
82
82
if pv != nil {
83
- t .Fatal ("expected nil pointer" )
83
+ t .Error ("expected nil pointer" )
84
84
}
85
85
})
86
86
}
0 commit comments