diff options
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/import-with-error-extra.slang | 11 | ||||
| -rw-r--r-- | tests/bugs/import-with-error.slang | 11 | ||||
| -rw-r--r-- | tests/bugs/import-with-error.slang.expected | 6 |
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/bugs/import-with-error-extra.slang b/tests/bugs/import-with-error-extra.slang new file mode 100644 index 000000000..259f6b5d1 --- /dev/null +++ b/tests/bugs/import-with-error-extra.slang @@ -0,0 +1,11 @@ +//TEST_IGNORE_FILE: + +// This file exists to be imported. +// +// It contains a semantic error that should lead to compilation failure +// in the module doing the importing. + +void broken() +{ + int a = b; +} diff --git a/tests/bugs/import-with-error.slang b/tests/bugs/import-with-error.slang new file mode 100644 index 000000000..f50bb1adb --- /dev/null +++ b/tests/bugs/import-with-error.slang @@ -0,0 +1,11 @@ +//TEST:SIMPLE:-use-ir + +// Confirm that we correctly issue a diagnostic when +// we `import` a module that has some errors in it. + +import import_with_error_extra; + +void main() +{ + broken(); +} diff --git a/tests/bugs/import-with-error.slang.expected b/tests/bugs/import-with-error.slang.expected new file mode 100644 index 000000000..b71dba0f1 --- /dev/null +++ b/tests/bugs/import-with-error.slang.expected @@ -0,0 +1,6 @@ +result code = -1 +standard error = { +tests/bugs/import-with-error-extra.slang(10): error 30015: undefined identifier 'b'. +} +standard output = { +} |
