| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
test_cmt_parser Namespace Reference

## Functions
def | _test_package
def | test_version
def | test_library
def | test_macro
def | test_apply_pattern
def | test_implicit_apply_pattern

## Variables
tuple | CMTParser

## Function Documentation

def test_cmt_parser._test_package | ( |  | ) |
| private

Definition at line 9 of file test_cmt_parser.py.

9
10 def _test_package():
11 tokens = list(CMTParser.parseString('package Test'))
12 assert tokens == ['package', 'Test']

def test_cmt_parser.test_apply_pattern | ( |  | ) |

Definition at line 46 of file test_cmt_parser.py.

46
47 def test_apply_pattern():
48 s = 'apply_pattern component_library library=L0DU'
49 tokens = list(CMTParser.parseString(s))
50 print tokens
51 assert tokens == ['apply_pattern', 'component_library', 'library=L0DU']

def test_cmt_parser.test_implicit_apply_pattern | ( |  | ) |

Definition at line 52 of file test_cmt_parser.py.

52
53 def test_implicit_apply_pattern():
54 s = 'component_library library=L0DU'
55 tokens = list(CMTParser.parseString(s))
56 print tokens
57 assert tokens == ['apply_pattern', 'component_library', 'library=L0DU']

def test_cmt_parser.test_library | ( |  | ) |

Definition at line 17 of file test_cmt_parser.py.

17
18 def test_library():
19 statement = 'library GaudiKernelLib *.cpp -no_static -import=Boost'
20 tokens = list(CMTParser.parseString(statement))
21 print tokens
22 assert tokens == ['library', 'GaudiKernelLib', '*.cpp', '-no_static', '-import=Boost']
23
24 statement = 'library TestLib test/lib/*.cpp a_variable=some_value -group=tests'
25 tokens = list(CMTParser.parseString(statement))
26 print tokens
27 assert tokens == ['library', 'TestLib', 'test/lib/*.cpp', 'a_variable=some_value', '-group=tests']

def test_cmt_parser.test_macro | ( |  | ) |

Definition at line 28 of file test_cmt_parser.py.

28
29 def test_macro():
30 s = 'macro_append ROOT_linkopts "some" WIN32 "other"'
31 tokens = list(CMTParser.parseString(s))
32 print tokens
33 assert tokens == ['macro_append', 'ROOT_linkopts', '"some"', 'WIN32', '"other"']
34
35 s = 'macro a_var "value"'
36 tokens = list(CMTParser.parseString(s))
37 print tokens
38 assert tokens == ['macro', 'a_var', '"value"']
39
40 s = 'macro a_var'
41 try:
42 tokens = list(CMTParser.parseString(s))
43 assert False, 'parsing should have failed: %r' % s
44 except ParseException:
45 pass

def test_cmt_parser.test_version | ( |  | ) |

Definition at line 13 of file test_cmt_parser.py.

13
14 def test_version():
15 tokens = list(CMTParser.parseString('version v1r2p3'))
16 assert tokens == ['version', 'v1r2p3']

## Variable Documentation

tuple test_cmt_parser.CMTParser

Initial value:
1 makeParser(set(["QMTest", "install_python_modules", "install_scripts",
2 "install_more_includes", "god_headers", "god_dictionary",
3 "PyQtResource", "PyQtUIC"])
4 | set(['reflex_dictionary', 'component_library', 'linker_library',
5 'copy_relax_rootmap']))

Definition at line 4 of file test_cmt_parser.py.