@@ -13,8 +13,8 @@ func (*testCloser) Close() error {
13
13
return nil
14
14
}
15
15
16
- func TestChooseConstructorWithConstructor (t * testing.T ) {
17
- ctor , err := chooseConstructor (func () int { return 0 })
16
+ func TestNewProperConstructorWithConstructor (t * testing.T ) {
17
+ ctor , err := newProperConstructor (func () int { return 0 })
18
18
if err != nil {
19
19
t .Logf ("%+v" , err )
20
20
t .Fail ()
@@ -26,8 +26,8 @@ func TestChooseConstructorWithConstructor(t *testing.T) {
26
26
}
27
27
}
28
28
29
- func TestChooseConstructorWithOpener (t * testing.T ) {
30
- ctor , err := chooseConstructor (func () * testCloser { return & testCloser {} })
29
+ func TestNewProperConstructorWithOpener (t * testing.T ) {
30
+ ctor , err := newProperConstructor (func () * testCloser { return & testCloser {} })
31
31
if err != nil {
32
32
t .Logf ("%+v" , err )
33
33
t .Fail ()
@@ -39,8 +39,8 @@ func TestChooseConstructorWithOpener(t *testing.T) {
39
39
}
40
40
}
41
41
42
- func TestChooseConstructorWithConstructorOfCloser (t * testing.T ) {
43
- ctor , err := chooseConstructor (func () (* testCloser , kdone.Destructor , error ) {
42
+ func TestNewProperConstructorWithConstructorOfCloser (t * testing.T ) {
43
+ ctor , err := newProperConstructor (func () (* testCloser , kdone.Destructor , error ) {
44
44
return & testCloser {}, kdone .Noop , nil
45
45
})
46
46
if err != nil {
@@ -54,8 +54,8 @@ func TestChooseConstructorWithConstructorOfCloser(t *testing.T) {
54
54
}
55
55
}
56
56
57
- func TestChooseConstructorWithStruct (t * testing.T ) {
58
- ctor , err := chooseConstructor (testCloser {})
57
+ func TestNewProperConstructorWithStruct (t * testing.T ) {
58
+ ctor , err := newProperConstructor (testCloser {})
59
59
if err != nil {
60
60
t .Logf ("%+v" , err )
61
61
t .Fail ()
@@ -67,8 +67,8 @@ func TestChooseConstructorWithStruct(t *testing.T) {
67
67
}
68
68
}
69
69
70
- func TestChooseConstructorWithStructPointer (t * testing.T ) {
71
- ctor , err := chooseConstructor ((* testCloser )(nil ))
70
+ func TestNewProperConstructorWithStructPointer (t * testing.T ) {
71
+ ctor , err := newProperConstructor ((* testCloser )(nil ))
72
72
if err != nil {
73
73
t .Logf ("%+v" , err )
74
74
t .Fail ()
@@ -80,26 +80,26 @@ func TestChooseConstructorWithStructPointer(t *testing.T) {
80
80
}
81
81
}
82
82
83
- func TestChooseConstructorWithWrongX (t * testing.T ) {
84
- _ , err := chooseConstructor (0 )
83
+ func TestNewProperConstructorWithWrongX (t * testing.T ) {
84
+ _ , err := newProperConstructor (0 )
85
85
t .Logf ("%+v" , err )
86
86
if kerror .ClassOf (err ) != kerror .ERuntime {
87
87
t .Fail ()
88
88
return
89
89
}
90
90
}
91
91
92
- func TestChooseConstructorWithWrongFunc (t * testing.T ) {
93
- _ , err := chooseConstructor (func () {})
92
+ func TestNewProperConstructorWithWrongFunc (t * testing.T ) {
93
+ _ , err := newProperConstructor (func () {})
94
94
t .Logf ("%+v" , err )
95
95
if kerror .ClassOf (err ) != kerror .ERuntime {
96
96
t .Fail ()
97
97
return
98
98
}
99
99
}
100
100
101
- func TestChooseConstructorWithWrongPointer (t * testing.T ) {
102
- _ , err := chooseConstructor ((* int )(nil ))
101
+ func TestNewProperConstructorWithWrongPointer (t * testing.T ) {
102
+ _ , err := newProperConstructor ((* int )(nil ))
103
103
t .Logf ("%+v" , err )
104
104
if kerror .ClassOf (err ) != kerror .ERuntime {
105
105
t .Fail ()
0 commit comments