Test integration with building.py
()
| 78 | return False |
| 79 | |
| 80 | def test_building_integration(): |
| 81 | """Test integration with building.py""" |
| 82 | try: |
| 83 | # Test that the function is available from the patch module |
| 84 | from scons_preprocessor_patch import create_preprocessor_instance |
| 85 | |
| 86 | print("\nTesting scons_preprocessor_patch integration...") |
| 87 | |
| 88 | # Test that the function is available |
| 89 | preprocessor = create_preprocessor_instance() |
| 90 | print("✓ create_preprocessor_instance function works from scons_preprocessor_patch") |
| 91 | |
| 92 | # Test basic processing |
| 93 | test_content = "#define BUILD_TEST 1" |
| 94 | preprocessor.process_contents(test_content) |
| 95 | namespace = preprocessor.cpp_namespace |
| 96 | |
| 97 | print(f"✓ Integration test passed: BUILD_TEST = {namespace.get('BUILD_TEST', 'Not found')}") |
| 98 | return True |
| 99 | |
| 100 | except Exception as e: |
| 101 | print(f"✗ Integration test failed: {e}") |
| 102 | return False |
| 103 | |
| 104 | if __name__ == "__main__": |
| 105 | print("SCons PreProcessor Patch Test Suite") |
no test coverage detected