Exemplo n.º 1
0
    def testAddCompilerFlagWithFlags(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags=[u'Weak', '-fno-arc'])

        dobj.add_compiler_flags('x')

        self.assertIsNotNone(dobj.settings.COMPILER_FLAGS)
        self.assertEquals(dobj.settings.COMPILER_FLAGS, u'Weak -fno-arc x')
Exemplo n.º 2
0
    def testAddAttributesWithoutAttributes(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags='x')

        dobj.add_attributes('Weak')

        self.assertIsNotNone(dobj.settings.ATTRIBUTES)
        self.assertEqual(dobj.settings.ATTRIBUTES, ['Weak'])
Exemplo n.º 3
0
    def testAddAttributesWithoutAttributes(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags="x")

        dobj.add_attributes(u'Weak')

        self.assertIsNotNone(dobj.settings.ATTRIBUTES)
        self.assertEquals(dobj.settings.ATTRIBUTES, [u'Weak'])
Exemplo n.º 4
0
    def testRemoveCompilerFlagsList(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags=['Weak', 'Custom', 'Another'])

        dobj.remove_compiler_flags(['Weak', 'Custom'])

        self.assertIsNotNone(dobj['settings'])
        self.assertEqual(dobj['settings'].__repr__(), PBXGenericObject().parse({'COMPILER_FLAGS': 'Another'}).__repr__())
Exemplo n.º 5
0
    def testAddAttributeList(self):
        dobj = PBXBuildFile.create(PBXGenericObject())

        dobj.add_attributes(['Weak', 'Custom'])

        self.assertIsNotNone(dobj.settings.ATTRIBUTES)
        self.assertEqual(dobj.settings.ATTRIBUTES, ['Weak', 'Custom'])
Exemplo n.º 6
0
    def testGetAttributesWithAttributes(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes='x')

        attributes = dobj.get_attributes()

        self.assertIsNotNone(attributes)
        self.assertEqual(attributes, ['x'])
Exemplo n.º 7
0
    def testAddCompilerFlagWithFlags(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags=['Weak', '-fno-arc'])

        dobj.add_compiler_flags('x')

        self.assertIsNotNone(dobj.settings.COMPILER_FLAGS)
        self.assertEqual(dobj.settings.COMPILER_FLAGS, 'Weak -fno-arc x')
Exemplo n.º 8
0
    def testAddCompilerFlagWithoutSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject())

        dobj.add_compiler_flags([u'Weak', '-fno-arc'])

        self.assertIsNotNone(dobj.settings.COMPILER_FLAGS)
        self.assertEquals(dobj.settings.COMPILER_FLAGS, u'Weak -fno-arc')
Exemplo n.º 9
0
    def testAddAttributesWithoutSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject())

        dobj.add_attributes(u'Weak')

        self.assertIsNotNone(dobj.settings.ATTRIBUTES)
        self.assertEquals(dobj.settings.ATTRIBUTES, [u'Weak'])
Exemplo n.º 10
0
    def testRemoveCompilerFlagsWithSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags='Weak')

        dobj.remove_compiler_flags('Weak')

        self.assertIsNone(dobj['settings'])
Exemplo n.º 11
0
    def testGetCompilerFlagsWithFlags(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags=['Weak', '-fno-arc'])

        self.assertIsNotNone(dobj.get_compiler_flags())
        self.assertEqual(dobj.get_compiler_flags(), 'Weak -fno-arc')
Exemplo n.º 12
0
    def testGetCompilerFlagsWithoutFlags(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes='x')

        self.assertIsNone(dobj.get_compiler_flags())
Exemplo n.º 13
0
    def testGetCompilerFlagsWithoutSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject())

        self.assertIsNone(dobj.get_compiler_flags())
Exemplo n.º 14
0
    def testGetAttributesWithoutAttributes(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags='x')

        attributes = dobj.get_attributes()

        self.assertIsNone(attributes)
Exemplo n.º 15
0
    def testGetAttributesWithoutSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject())

        attributes = dobj.get_attributes()

        self.assertIsNone(attributes)
Exemplo n.º 16
0
    def testRemoveAttributesWithSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes=["Weak"])

        dobj.remove_attributes('Weak')

        self.assertIsNone(dobj[u'settings'])
Exemplo n.º 17
0
    def testRemoveAttributesWithSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes=['Weak'])

        dobj.remove_attributes('Weak')

        self.assertIsNone(dobj['settings'])
Exemplo n.º 18
0
    def testRemoveAttributeList(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes=['Weak', 'Custom'])

        dobj.remove_attributes(['Weak', 'Custom'])

        self.assertIsNone(dobj['settings'])
Exemplo n.º 19
0
    def testRemoveCompilerFlagsWithSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags=u'Weak')

        dobj.remove_compiler_flags('Weak')

        self.assertIsNone(dobj[u'settings'])