"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py" (8 Mar 2017, 1018 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env python
    2 # Copyright (c) 2012 Google Inc. All rights reserved.
    3 # Use of this source code is governed by a BSD-style license that can be
    4 # found in the LICENSE file.
    5 
    6 """ Unit tests for the msvs.py file. """
    7 
    8 import gyp.generator.msvs as msvs
    9 import unittest
   10 import StringIO
   11 
   12 
   13 class TestSequenceFunctions(unittest.TestCase):
   14 
   15   def setUp(self):
   16     self.stderr = StringIO.StringIO()
   17 
   18   def test_GetLibraries(self):
   19     self.assertEqual(
   20       msvs._GetLibraries({}),
   21       [])
   22     self.assertEqual(
   23       msvs._GetLibraries({'libraries': []}),
   24       [])
   25     self.assertEqual(
   26       msvs._GetLibraries({'other':'foo', 'libraries': ['a.lib']}),
   27       ['a.lib'])
   28     self.assertEqual(
   29       msvs._GetLibraries({'libraries': ['-la']}),
   30       ['a.lib'])
   31     self.assertEqual(
   32       msvs._GetLibraries({'libraries': ['a.lib', 'b.lib', 'c.lib', '-lb.lib',
   33                                    '-lb.lib', 'd.lib', 'a.lib']}),
   34       ['c.lib', 'b.lib', 'd.lib', 'a.lib'])
   35 
   36 if __name__ == '__main__':
   37   unittest.main()