示例#1
0
 def test_pointerKernelStyle(self):
     tested = parsecpp.VariableDeclaration('int * a',
                                           asterixInFirstColum=False)
     self.assertEquals(tested.colums()[0], 'int')
     self.assertEquals(tested.colums()[1], '* a')
示例#2
0
 def test_pointer(self):
     tested = parsecpp.VariableDeclaration('int * a')
     self.assertEquals(tested.colums()[0], 'int *')
     self.assertEquals(tested.colums()[1], 'a')
示例#3
0
 def test_reference(self):
     tested = parsecpp.VariableDeclaration('int & a')
     self.assertEquals(tested.colums()[0], 'int &')
     self.assertEquals(tested.colums()[1], 'a')
示例#4
0
 def test_default(self):
     tested = parsecpp.VariableDeclaration('int a = 3')
     self.assertEquals(tested.colums()[0], 'int')
     self.assertEquals(tested.colums()[1], 'a = 3')
示例#5
0
 def test_array(self):
     tested = parsecpp.VariableDeclaration('int a[ kuki ]')
     self.assertEquals(tested.colums()[0], 'int')
     self.assertEquals(tested.colums()[1], 'a[ kuki ]')
示例#6
0
 def test_trivialSplit(self):
     tested = parsecpp.VariableDeclaration('int a')
     self.assertEquals(tested.colums()[0], 'int')
     self.assertEquals(tested.colums()[1], 'a')
 def argumentsTwoColumTable(self):
     arguments = self._argumentsExpressions()
     colums = [parsecpp.VariableDeclaration(a).colums() for a in arguments]
     return colums
 def memberTwoColumTable(self):
     members = self._memberExpressions()
     colums = [parsecpp.VariableDeclaration(m).colums() for m in members]
     return colums