OLD | NEW |
| 1 #!/usr/bin/env python |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 4 # found in the LICENSE file. |
4 | 5 |
5 from code import Code | 6 from code import Code |
6 import unittest | 7 import unittest |
7 | 8 |
8 class CodeTest(unittest.TestCase): | 9 class CodeTest(unittest.TestCase): |
9 def testAppend(self): | 10 def testAppend(self): |
10 c = Code() | 11 c = Code() |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 self.assertEquals('// 20% of 80%s', c.Render()) | 156 self.assertEquals('// 20% of 80%s', c.Render()) |
156 d = Code() | 157 d = Code() |
157 d.Append('90') | 158 d.Append('90') |
158 d.Concat(c) | 159 d.Concat(c) |
159 self.assertEquals('90\n' | 160 self.assertEquals('90\n' |
160 '// 20% of 80%s', | 161 '// 20% of 80%s', |
161 d.Render()) | 162 d.Render()) |
162 | 163 |
163 if __name__ == '__main__': | 164 if __name__ == '__main__': |
164 unittest.main() | 165 unittest.main() |
OLD | NEW |