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

Side by Side Diff: pylib/gyp/common_test.py

Issue 10378042: Correct the order in which OutputDirectory and IntermediateDirectory are defined. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 7 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/common.py ('k') | pylib/gyp/generator/msvs.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """Unit tests for the common.py file."""
8
9 import gyp.common
10 import unittest
11
12
13 class TestTopologicallySorted(unittest.TestCase):
14 def test_Valid(self):
15 """Test that sorting works on a valid graph with one possible order."""
16 graph = {
17 'a': ['b', 'c'],
18 'b': [],
19 'c': ['d'],
20 'd': ['b'],
21 }
22 def GetEdge(node):
23 return tuple(graph[node])
24 self.assertEqual(
25 gyp.common.TopologicallySorted(graph.keys(), GetEdge),
26 ['a', 'c', 'd', 'b'])
27
28 def test_Cycle(self):
29 """Test that an exception is thrown on a cyclic graph."""
30 graph = {
31 'a': ['b'],
32 'b': ['c'],
33 'c': ['d'],
34 'd': ['a'],
35 }
36 def GetEdge(node):
37 return tuple(graph[node])
38 self.assertRaises(
39 gyp.common.CycleError, gyp.common.TopologicallySorted,
40 graph.keys(), GetEdge)
41
42
43 if __name__ == '__main__':
44 unittest.main()
OLDNEW
« no previous file with comments | « pylib/gyp/common.py ('k') | pylib/gyp/generator/msvs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698