Rename all C++0x to C++11 and cpp0x to cpp11
This commit is contained in:
parent
173c4b3bba
commit
738cc36aab
52 changed files with 307 additions and 307 deletions
|
|
@ -1,12 +0,0 @@
|
|||
import cpp0x_function_objects
|
||||
import sys
|
||||
|
||||
t = cpp0x_function_objects.Test()
|
||||
if t.value != 0:
|
||||
raise RuntimeError("Runtime cpp0x_function_objects failed. t.value should be 0, but is " + str(t.value))
|
||||
|
||||
t(1,2) # adds numbers and sets value
|
||||
|
||||
if t.value != 3:
|
||||
raise RuntimeError("Runtime cpp0x_function_objects failed. t.value not changed - should be 3, but is " + str(t.value))
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
import cpp0x_initializer_list_extend
|
||||
|
||||
c = cpp0x_initializer_list_extend.Container( [10, 20, 30, 40] )
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import cpp0x_initializer_list
|
||||
|
||||
a = cpp0x_initializer_list.A()
|
||||
a = cpp0x_initializer_list.A(11.1)
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
import cpp0x_null_pointer_constant
|
||||
|
||||
a = cpp0x_null_pointer_constant.A()
|
||||
|
||||
if a._myA != None:
|
||||
raise RuntimeError, ("cpp0x_null_pointer_constant: _myA should be None, but is ", a._myA)
|
||||
|
||||
b = cpp0x_null_pointer_constant.A()
|
||||
if a._myA != b._myA:
|
||||
raise RuntimeError, ("cpp0x_null_pointer_constant: a._myA should be the same as b._myA, but ", a._myA, "!=", b._myA)
|
||||
|
||||
a._myA = cpp0x_null_pointer_constant.A()
|
||||
if a._myA == None:
|
||||
raise RuntimeError, ("cpp0x_null_pointer_constant: _myA should be object, but is None")
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import cpp0x_result_of
|
||||
if cpp0x_result_of.test_result(cpp0x_result_of.square, 3.0) != 9.0:
|
||||
raise RuntimeError, "test_result(square, 3.0) is not 9.0."
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import cpp0x_alternate_function_syntax
|
||||
import cpp11_alternate_function_syntax
|
||||
|
||||
a = cpp0x_alternate_function_syntax.SomeStruct()
|
||||
a = cpp11_alternate_function_syntax.SomeStruct()
|
||||
|
||||
res = a.addNormal(4,5)
|
||||
if res != 9:
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import cpp0x_decltype
|
||||
import cpp11_decltype
|
||||
|
||||
a = cpp0x_decltype.A()
|
||||
a = cpp11_decltype.A()
|
||||
a.i = 5
|
||||
if a.i != 5:
|
||||
raise RuntimeError, "Assignment to a.i failed."
|
||||
12
Examples/test-suite/python/cpp11_function_objects_runme.py
Normal file
12
Examples/test-suite/python/cpp11_function_objects_runme.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import cpp11_function_objects
|
||||
import sys
|
||||
|
||||
t = cpp11_function_objects.Test()
|
||||
if t.value != 0:
|
||||
raise RuntimeError("Runtime cpp11_function_objects failed. t.value should be 0, but is " + str(t.value))
|
||||
|
||||
t(1,2) # adds numbers and sets value
|
||||
|
||||
if t.value != 3:
|
||||
raise RuntimeError("Runtime cpp11_function_objects failed. t.value not changed - should be 3, but is " + str(t.value))
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
import cpp11_initializer_list_extend
|
||||
|
||||
c = cpp11_initializer_list_extend.Container( [10, 20, 30, 40] )
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import cpp11_initializer_list
|
||||
|
||||
a = cpp11_initializer_list.A()
|
||||
a = cpp11_initializer_list.A(11.1)
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import cpp11_null_pointer_constant
|
||||
|
||||
a = cpp11_null_pointer_constant.A()
|
||||
|
||||
if a._myA != None:
|
||||
raise RuntimeError, ("cpp11_null_pointer_constant: _myA should be None, but is ", a._myA)
|
||||
|
||||
b = cpp11_null_pointer_constant.A()
|
||||
if a._myA != b._myA:
|
||||
raise RuntimeError, ("cpp11_null_pointer_constant: a._myA should be the same as b._myA, but ", a._myA, "!=", b._myA)
|
||||
|
||||
a._myA = cpp11_null_pointer_constant.A()
|
||||
if a._myA == None:
|
||||
raise RuntimeError, ("cpp11_null_pointer_constant: _myA should be object, but is None")
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from cpp0x_raw_string_literals import *
|
||||
from cpp11_raw_string_literals import *
|
||||
|
||||
if cvar.L != 100:
|
||||
raise RuntimeError
|
||||
3
Examples/test-suite/python/cpp11_result_of_runme.py
Normal file
3
Examples/test-suite/python/cpp11_result_of_runme.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import cpp11_result_of
|
||||
if cpp11_result_of.test_result(cpp11_result_of.square, 3.0) != 9.0:
|
||||
raise RuntimeError, "test_result(square, 3.0) is not 9.0."
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import cpp0x_rvalue_reference
|
||||
import cpp11_rvalue_reference
|
||||
|
||||
a = cpp0x_rvalue_reference.A()
|
||||
a = cpp11_rvalue_reference.A()
|
||||
|
||||
a.setAcopy(5)
|
||||
if a.getAcopy() != 5:
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from cpp0x_thread_local import *
|
||||
from cpp11_thread_local import *
|
||||
|
||||
t = ThreadLocals()
|
||||
if t.stval != 11:
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
import cpp0x_uniform_initialization
|
||||
import cpp11_uniform_initialization
|
||||
|
||||
var1 = cpp0x_uniform_initialization.cvar.var1
|
||||
var1 = cpp11_uniform_initialization.cvar.var1
|
||||
if var1.x != 5:
|
||||
raise RuntimeError
|
||||
var2 = cpp0x_uniform_initialization.cvar.var2
|
||||
var2 = cpp11_uniform_initialization.cvar.var2
|
||||
if var2.getX() != 2:
|
||||
raise RuntimeError
|
||||
|
||||
m = cpp0x_uniform_initialization.MoreInit()
|
||||
m = cpp11_uniform_initialization.MoreInit()
|
||||
if m.charptr != None:
|
||||
raise RuntimeError, m.charptr
|
||||
m.charptr = "hello sir"
|
||||
Loading…
Add table
Add a link
Reference in a new issue