| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*************************************** | ||
| 2 | Auteur : Pierre Aubert | ||
| 3 | Mail : pierre.aubert@lapp.in2p3.fr | ||
| 4 | Licence : CeCILL-C | ||
| 5 | ****************************************/ | ||
| 6 | |||
| 7 | #include <iostream> | ||
| 8 | |||
| 9 | #include "phoenix_dl.h" | ||
| 10 | |||
| 11 | ///Test function mangling | ||
| 12 | /** @return true on success, false otherwise | ||
| 13 | */ | ||
| 14 | 1 | bool testMangleFunction(){ | |
| 15 |
1/1✓ Branch 0 (4→5) taken 1 times.
|
2 | std::string functionPrototype("void print_arch(const std::string&)"); |
| 16 |
3/3✓ Branch 0 (8→9) taken 1 times.
✓ Branch 2 (11→12) taken 1 times.
✓ Branch 4 (12→13) taken 1 times.
|
3 | std::string mangleFunction(phoenix_mangleFunction(functionPrototype)); |
| 17 |
6/6✓ Branch 0 (17→18) taken 1 times.
✓ Branch 2 (18→19) taken 1 times.
✓ Branch 4 (19→20) taken 1 times.
✓ Branch 6 (20→21) taken 1 times.
✓ Branch 8 (21→22) taken 1 times.
✓ Branch 10 (22→23) taken 1 times.
|
1 | std::cout << "testMangleFunction : mangeling of '"<<functionPrototype<<"' = '"<<mangleFunction<<"'" << std::endl; |
| 18 |
1/1✓ Branch 0 (25→26) taken 1 times.
|
1 | std::string expectedMangle("_Z10print_archRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"); |
| 19 | 1 | bool b(expectedMangle == mangleFunction); | |
| 20 | |||
| 21 |
4/4✓ Branch 0 (30→31) taken 1 times.
✓ Branch 2 (33→34) taken 1 times.
✓ Branch 4 (34→35) taken 1 times.
✓ Branch 6 (35→36) taken 1 times.
|
3 | b &= phoenix_mangleFunction(functionPrototype, "", "someInexistingCompiler") == ""; |
| 22 |
3/3✓ Branch 0 (41→42) taken 1 times.
✓ Branch 2 (42→43) taken 1 times.
✓ Branch 4 (43→44) taken 1 times.
|
1 | std::cout << "testMangleFunction : b = " << b << std::endl; |
| 23 | 1 | return b; | |
| 24 | 1 | } | |
| 25 | |||
| 26 | |||
| 27 | 1 | int main(int argc, char** argv){ | |
| 28 | 1 | bool b(testMangleFunction()); | |
| 29 | |||
| 30 | 1 | return b - 1; | |
| 31 | } | ||
| 32 | |||
| 33 |