Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / trace_viewer / build / check_common_unittest.py
1 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 import unittest
5
6 from trace_viewer.build import check_common
7
8 class CheckCommonUnittTest(unittest.TestCase):
9   def test_filesSortedTest(self):
10     error = check_common.CheckListedFilesSorted('foo.gyp', 'tracing_pdf_files',
11                                                 ['/dir/file.pdf',
12                                                  '/dir/another_file.pdf'])
13     expected_error = '''In group tracing_pdf_files from file foo.gyp,\
14  filenames aren't sorted.
15
16 First mismatch:
17   /dir/file.pdf
18
19 Current listing:
20   /dir/file.pdf
21   /dir/another_file.pdf
22
23 Correct listing:
24   /dir/another_file.pdf
25   /dir/file.pdf\n\n'''
26     assert error == expected_error