@@ -131,7 +131,7 @@ class Abstract2 {
131
131
132
132
template<class A, class B, class C = A>
133
133
C multiply(A a, B b) {
134
- return C{a*b} ;
134
+ return static_cast<C>(a * b) ;
135
135
}
136
136
137
137
//-----
@@ -253,8 +253,8 @@ def test_keyword_arguments(self):
253
253
def test_doc_strings (self ):
254
254
import cppyy
255
255
from cppyy .gbl import Concrete
256
- assert 'void Concrete::array_method(int* ad, int size)' in Concrete .array_method .__doc__
257
- assert 'void Concrete::array_method(double* ad, int size)' in Concrete .array_method .__doc__
256
+ assert 'void Concrete::array_method(int * ad, int size)' . replace ( " " , "" ) in Concrete .array_method .__doc__ . replace ( " " , "" )
257
+ assert 'void Concrete::array_method(double * ad, int size)' . replace ( " " , "" ) in Concrete .array_method .__doc__ . replace ( " " , "" )
258
258
259
259
def test_enums (self ):
260
260
import cppyy
@@ -682,7 +682,7 @@ def test08_shared_ptr(self):
682
682
assert type (Zoo .free_lion ).__name__ == 'Lion'
683
683
684
684
smart_lion = Zoo .free_lion .__smartptr__ ()
685
- assert type (smart_lion ).__name__ in ['shared_ptr<Zoo::Lion>' , 'std::shared_ptr<Zoo::Lion>' ]
685
+ assert type (smart_lion ).__name__ in ['shared_ptr<Zoo::Lion>' , 'std::shared_ptr<Zoo::Lion>' , 'shared_ptr<Lion>' , 'std::shared_ptr<Lion>' ]
686
686
687
687
assert Zoo .identify_animal (Zoo .free_lion ) == "the animal is a lion"
688
688
assert Zoo .identify_animal_smart (Zoo .free_lion ) == "the animal is a lion"
@@ -698,14 +698,14 @@ def test09_templated_function(self):
698
698
assert 'multiply' in cppyy .gbl .__dict__
699
699
700
700
assert mul (1 , 2 ) == 2
701
- assert 'multiply<int,int,int>' in cppyy .gbl .__dict__
701
+ assert 'multiply<int,int,int>' in map ( lambda x : x . replace ( " " , "" ), cppyy .gbl .__dict__ )
702
702
assert mul (1. , 5 ) == 5.
703
- assert 'multiply<double,int,double>' in cppyy .gbl .__dict__
703
+ assert 'multiply<double,int,double>' in map ( lambda x : x . replace ( " " , "" ), cppyy .gbl .__dict__ )
704
704
705
705
assert mul [int ] (1 , 1 ) == 1
706
- assert 'multiply<int>' in cppyy .gbl .__dict__
706
+ assert 'multiply<int>' in map ( lambda x : x . replace ( " " , "" ), cppyy .gbl .__dict__ )
707
707
assert mul [int , int ](1 , 1 ) == 1
708
- assert 'multiply<int,int>' in cppyy .gbl .__dict__
708
+ assert 'multiply<int,int>' in map ( lambda x : x . replace ( " " , "" ), cppyy .gbl .__dict__ )
709
709
710
710
# make sure cached values are actually looked up
711
711
old = getattr (cppyy .gbl , 'multiply<int,int>' )
0 commit comments