File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 7474import test_smart_pointer
7575import test_pattern_parser
7676import test_function_pointer
77+ import test_directory_cache
7778
7879testers = [
7980 # , demangled_tester # failing right now
140141 test_argument_without_name ,
141142 test_smart_pointer ,
142143 test_pattern_parser ,
143- test_function_pointer
144+ test_function_pointer ,
145+ test_directory_cache
144146]
145147
146148if 'posix' in os .name :
Original file line number Diff line number Diff line change 1+ # Copyright 2014-2016 Insight Software Consortium.
2+ # Copyright 2004-2009 Roman Yakovenko.
3+ # Distributed under the Boost Software License, Version 1.0.
4+ # See http://www.boost.org/LICENSE_1_0.txt
5+
6+ import unittest
7+ import parser_test_case
8+
9+ from pygccxml import parser
10+
11+
12+ class Test (parser_test_case .parser_test_case_t ):
13+
14+ def __init__ (self , * args ):
15+ parser_test_case .parser_test_case_t .__init__ (self , * args )
16+ self .header = "core_cache.hpp"
17+
18+ def test_elaborated_types (self ):
19+ """
20+ Test the directory cache
21+
22+ """
23+
24+ cache = parser .directory_cache_t (
25+ directory = "unittests/data/directory_cache_test" )
26+ # Generate a cache on first read
27+ parser .parse ([self .header ], self .config , cache = cache )
28+ # Read from the cache the second time
29+ parser .parse ([self .header ], self .config , cache = cache )
30+
31+
32+ def create_suite ():
33+ suite = unittest .TestSuite ()
34+ suite .addTest (unittest .makeSuite (Test ))
35+ return suite
36+
37+
38+ def run_suite ():
39+ unittest .TextTestRunner (verbosity = 2 ).run (create_suite ())
40+
41+ if __name__ == "__main__" :
42+ run_suite ()
You can’t perform that action at this time.
0 commit comments