Exemple #1
0
    def test_flags_entry_point(self):
        java_linker = self._get_linker('java')
        self.assertEqual(
            java_linker.flags(opts.option_list(opts.entry_point('Main'))),
            ['--main=Main'])

        with self.assertRaises(ValueError):
            self.linker.flags(opts.option_list(opts.entry_point('Main')))
Exemple #2
0
    def test_flags_entry_point(self):
        java_linker = self._get_linker('java')
        self.assertEqual(java_linker.flags(opts.option_list(
            opts.entry_point('symbol')
        )), ['--main=symbol'])

        self.assertEqual(self.linker.flags(opts.option_list(
            opts.entry_point('symbol')
        )), ['-Wl,-e,symbol'])
Exemple #3
0
    def test_flags_gui(self):
        self.assertEqual(self.linker.flags(opts.option_list(opts.gui())),
                         ['/SUBSYSTEM:WINDOWS'])
        self.assertEqual(self.linker.flags(opts.option_list(opts.gui(False))),
                         ['/SUBSYSTEM:WINDOWS'])
        self.assertEqual(self.linker.flags(opts.option_list(opts.gui(True))),
                         ['/SUBSYSTEM:WINDOWS', '/ENTRY:mainCRTStartup'])

        self.assertEqual(self.linker.flags(opts.option_list(
            opts.entry_point('symbol'), opts.gui(True)
        )), ['/ENTRY:symbol', '/SUBSYSTEM:WINDOWS'])
        self.assertEqual(self.linker.flags(opts.option_list(
            opts.gui(True), opts.entry_point('symbol')
        )), ['/SUBSYSTEM:WINDOWS', '/ENTRY:symbol'])
Exemple #4
0
 def test_output_file(self):
     self.assertEqual(self.linker.output_file('file', None),
                      file_types.Library(Path('file.jar'), 'jvm', 'java'))
     self.assertEqual(
         self.linker.output_file(
             'file',
             AttrDict(options=opts.option_list(opts.entry_point('foo')))),
         file_types.ExecutableLibrary(Path('file.jar'), 'jvm', 'java'))
Exemple #5
0
 def test_flags_entry_point(self):
     self.assertEqual(
         self.linker.flags(opts.option_list(opts.entry_point('symbol'))),
         [])