Initialization list doc updates and new tests. Fix functions with default arguments that are initializer lists
This commit is contained in:
parent
a043b55b69
commit
c8ff23de0c
6 changed files with 96 additions and 14 deletions
|
|
@ -0,0 +1,21 @@
|
|||
import cpp0x_uniform_initialization
|
||||
|
||||
var1 = cpp0x_uniform_initialization.cvar.var1
|
||||
if var1.x != 5:
|
||||
raise RuntimeError
|
||||
var2 = cpp0x_uniform_initialization.cvar.var2
|
||||
if var2.getX() != 2:
|
||||
raise RuntimeError
|
||||
|
||||
m = cpp0x_uniform_initialization.MoreInit()
|
||||
if m.charptr != None:
|
||||
raise RuntimeError, m.charptr
|
||||
m.charptr = "hello sir"
|
||||
if m.charptr != "hello sir":
|
||||
raise RuntimeError, m.charptr
|
||||
if m.more1(m.vi) != 15:
|
||||
raise RuntimeError, m.vi
|
||||
if m.more1( [-1,1,2] ) != 2:
|
||||
raise RuntimeError, m.vi
|
||||
if m.more1() != 10:
|
||||
raise RuntimeError
|
||||
Loading…
Add table
Add a link
Reference in a new issue