a5c0f7fdcc
When a test file declares one or more expected diagnostics, we check those instead of checking the result value. The severities and source ranges must match. We don't test the error messages themselves because they are not part of the specification and may vary between implementations or, in future, be translated into other languages.
20 lines
428 B
Perl
20 lines
428 B
Perl
# This test verifies that comma-separated attributes on the same line are
|
|
# reported as an error, rather than being parsed like an object constructor
|
|
# expression.
|
|
|
|
diagnostics {
|
|
error {
|
|
# Message like "missing newline after argument" or "each argument must be on its own line"
|
|
from {
|
|
line = 1
|
|
column = 14
|
|
byte = 13
|
|
}
|
|
to {
|
|
line = 1
|
|
column = 15
|
|
byte = 14
|
|
}
|
|
}
|
|
}
|