Пример #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')
Пример #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'])
Пример #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'])
Пример #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__())
Пример #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'])
Пример #6
0
    def testGetAttributesWithAttributes(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes='x')

        attributes = dobj.get_attributes()

        self.assertIsNotNone(attributes)
        self.assertEqual(attributes, ['x'])
Пример #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')
Пример #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')
Пример #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'])
Пример #10
0
    def testRemoveCompilerFlagsWithSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags='Weak')

        dobj.remove_compiler_flags('Weak')

        self.assertIsNone(dobj['settings'])
Пример #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')
Пример #12
0
    def testGetCompilerFlagsWithoutFlags(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes='x')

        self.assertIsNone(dobj.get_compiler_flags())
Пример #13
0
    def testGetCompilerFlagsWithoutSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject())

        self.assertIsNone(dobj.get_compiler_flags())
Пример #14
0
    def testGetAttributesWithoutAttributes(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags='x')

        attributes = dobj.get_attributes()

        self.assertIsNone(attributes)
Пример #15
0
    def testGetAttributesWithoutSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject())

        attributes = dobj.get_attributes()

        self.assertIsNone(attributes)
Пример #16
0
    def testRemoveAttributesWithSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes=["Weak"])

        dobj.remove_attributes('Weak')

        self.assertIsNone(dobj[u'settings'])
Пример #17
0
    def testRemoveAttributesWithSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes=['Weak'])

        dobj.remove_attributes('Weak')

        self.assertIsNone(dobj['settings'])
Пример #18
0
    def testRemoveAttributeList(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), attributes=['Weak', 'Custom'])

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

        self.assertIsNone(dobj['settings'])
Пример #19
0
    def testRemoveCompilerFlagsWithSettings(self):
        dobj = PBXBuildFile.create(PBXGenericObject(), compiler_flags=u'Weak')

        dobj.remove_compiler_flags('Weak')

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