Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: pylib/gyp/generator/msvs_test.py

Issue 10948014: Allow library entries of the form '-lfoo' on MSVS. (Closed) Base URL: https://gyp.googlecode.com/svn/trunk
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2011 Google Inc. All rights reserved. 3 # Copyright (c) 2011 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ Unit tests for the msvs.py file. """ 7 """ Unit tests for the msvs.py file. """
8 8
9 import gyp.generator.msvs as msvs 9 import gyp.generator.msvs as msvs
10 import unittest 10 import unittest
11 import StringIO 11 import StringIO
12 12
13 13
14 class TestSequenceFunctions(unittest.TestCase): 14 class TestSequenceFunctions(unittest.TestCase):
15 15
16 def setUp(self): 16 def setUp(self):
17 self.stderr = StringIO.StringIO() 17 self.stderr = StringIO.StringIO()
18 18
19 def test_GetLibraries(self): 19 def test_GetLibraries(self):
20 self.assertEqual( 20 self.assertEqual(
21 msvs._GetLibraries({}), 21 msvs._GetLibraries({}),
22 []) 22 [])
23 self.assertEqual( 23 self.assertEqual(
24 msvs._GetLibraries({'libraries': []}), 24 msvs._GetLibraries({'libraries': []}),
25 []) 25 [])
26 self.assertEqual( 26 self.assertEqual(
27 msvs._GetLibraries({'other':'foo', 'libraries': ['a.lib']}), 27 msvs._GetLibraries({'other':'foo', 'libraries': ['a.lib']}),
28 ['a.lib']) 28 ['a.lib'])
29 self.assertEqual( 29 self.assertEqual(
30 msvs._GetLibraries({'libraries': ['-la']}),
31 ['a.lib'])
32 self.assertEqual(
30 msvs._GetLibraries({'libraries': ['a.lib', 'b.lib', 'c.lib', '-lb.lib', 33 msvs._GetLibraries({'libraries': ['a.lib', 'b.lib', 'c.lib', '-lb.lib',
31 '-lb.lib', 'd.lib', 'a.lib']}), 34 '-lb.lib', 'd.lib', 'a.lib']}),
32 ['c.lib', 'b.lib', 'd.lib', 'a.lib']) 35 ['c.lib', 'b.lib', 'd.lib', 'a.lib'])
33 36
34 if __name__ == '__main__': 37 if __name__ == '__main__':
35 unittest.main() 38 unittest.main()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698