Skip to content

Commit

Permalink
test: fix tests for check that compares declarations and file extensi…
Browse files Browse the repository at this point in the history
…on (#568)

### Summary of Changes

For the test files that compare the declarations in a module with the
file extension:
* Fix file extension
* Fix expected message
  • Loading branch information
lars-reimann authored Sep 20, 2023
1 parent 2803305 commit 48b5f53
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ pipeline »myPipeline« {}
// $TEST$ error "A stub file must not declare pipelines or segments."
segment »mySegment«() {}

// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
annotation »MyAnnotation«
// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
class »MyClass« {

// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
attr »a«: Int

// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
class »MyNestedClass«

// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
enum »MyEnum«

// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
fun »myFunction«()
}
// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
enum »MyEnum« {
// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
»MyEnumInstance«
}
// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
fun »myFunction«()
// $TEST$ no error "A pipeline file must only declare pipelines and segments."
// $TEST$ no error "A stub file must not declare pipelines or segments."
schema »MySchema« {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package tests.validation.other.modules.declarationsInTestFiles

// $TEST$ no error "A stub file must not declare pipelines or segments."
pipeline »myPipeline« {}
// $TEST$ no error "A stub file must not declare pipelines or segments."
segment »mySegment«() {}

// $TEST$ no error "A stub file must not declare pipelines or segments."
annotation »MyAnnotation«
// $TEST$ no error "A stub file must not declare pipelines or segments."
class »MyClass« {

// $TEST$ no error "A stub file must not declare pipelines or segments."
attr »a«: Int

// $TEST$ no error "A stub file must not declare pipelines or segments."
class »MyNestedClass«

// $TEST$ no error "A stub file must not declare pipelines or segments."
enum »MyEnum«

// $TEST$ no error "A stub file must not declare pipelines or segments."
fun »myFunction«()
}
// $TEST$ no error "A stub file must not declare pipelines or segments."
enum »MyEnum« {
// $TEST$ no error "A stub file must not declare pipelines or segments."
»MyEnumInstance«
}
// $TEST$ no error "A stub file must not declare pipelines or segments."
fun »myFunction«()
// $TEST$ no error "A stub file must not declare pipelines or segments."
schema »MySchema« {}

0 comments on commit 48b5f53

Please sign in to comment.