| 1 | module nspkg |
| 2 | |
| 3 | import nspkg.tests.signaturefixtures |
| 4 | import os |
| 5 | |
| 6 | fn test_public_api_declarations_remain_compatible() ! { |
| 7 | output := signaturefixtures.command('v', [ |
| 8 | 'run', |
| 9 | os.join_path(@VMODROOT, 'tests', 'api_surface.v'), |
| 10 | '--self-test', |
| 11 | ])! |
| 12 | assert output.contains('Public V API preserved: 266 functions,') |
| 13 | } |
| 14 | |
| 15 | fn test_c_oracle_implementation_does_not_import_the_current_backend() ! { |
| 16 | for name in ['alpm.v', 'list.v'] { |
| 17 | text := os.read_file(os.join_path(@VMODROOT, 'tests', 'coracle', name))! |
| 18 | assert !text.contains('import nspkg') |
| 19 | assert !text.contains('engine.') |
| 20 | } |
| 21 | } |
| 22 | |