-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ingo Müller <[email protected]>
- Loading branch information
1 parent
088dec1
commit 9130481
Showing
4 changed files
with
136 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// RUN: structured-opt -verify-diagnostics -split-input-file %s | ||
|
||
// Test error if no symbol was found for `extension_function` op. | ||
substrait.plan version 0 : 42 : 1 { | ||
// expected-error@+1 {{'substrait.extension_function' op refers to @extension, which is not a valid 'uri' op}} | ||
extension_function @function at @extension["somefunc"] | ||
} | ||
|
||
// ----- | ||
|
||
// Test error if no symbol was found for `extension_type` op. | ||
substrait.plan version 0 : 42 : 1 { | ||
// expected-error@+1 {{'substrait.extension_type' op refers to @extension, which is not a valid 'uri' op}} | ||
extension_type @type at @extension["sometype"] | ||
} | ||
|
||
// ----- | ||
|
||
// Test error if no symbol was found for `extension_type_variation` op. | ||
substrait.plan version 0 : 42 : 1 { | ||
// expected-error@+1 {{'substrait.extension_type_variation' op refers to @extension, which is not a valid 'uri' op}} | ||
extension_type_variation @type_var at @extension["sometypevar"] | ||
} | ||
|
||
// ----- | ||
|
||
// Test error if symbol was in the wrong scope. | ||
substrait.uri @extension at "http://some.url/with/extensions.yml" | ||
substrait.plan version 0 : 42 : 1 { | ||
// expected-error@+1 {{'substrait.extension_function' op refers to @extension, which is not a valid 'uri' op}} | ||
extension_function @function at @extension["somefunc"] | ||
} | ||
|
||
// ----- | ||
|
||
// Test error if no symbol refers to an op of the wrong type. | ||
substrait.plan version 0 : 42 : 1 { | ||
uri @extension at "http://some.url/with/extensions.yml" | ||
extension_function @function.1 at @extension["somefunc"] | ||
// expected-error@+1 {{'substrait.extension_function' op refers to @function.1, which is not a valid 'uri' op}} | ||
extension_function @function.2 at @function.1["somefunc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.