Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test resolution annotations, enabled tests #961

Merged
merged 3 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ ruleset testE30
}
}

// GAIAPLAT-1025
// GAIAPLAT-1025 (fixed)
ruleset test_comment
{
/* COMMENT
Expand Down
2 changes: 1 addition & 1 deletion production/tools/tests/gaiat/integration_test.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ ruleset test13
}
}

// GAIAPLAT-1179
// GAIAPLAT-1179 (fixed)
ruleset testE31
{
on_update(incubator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ruleset test109
}
}

// GAIAPLAT-1396
// GAIAPLAT-1396 (fixed)
// CHECK: A field may not be referenced in the 'on_insert' statement. The 'on_insert' attribute only accepts a table.
2 changes: 1 addition & 1 deletion production/tools/tests/gaiat/queries_test12.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ruleset test43
}

// CHECK: Field 'portion' cannot be used after a '->' in a path. Use a '.' to separate the table name from the field name.
// GAIAPLAT-877
// GAIAPLAT-877 (fixed)
7 changes: 3 additions & 4 deletions production/tools/tests/gaiat/tags_test09.ruleset
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: echo "WARNING: Variable declaration hides a tag." | FileCheck %s
// not %gaiat %s -- 2>&1| FileCheck %s
// RUN: not %gaiat %s -- 2>&1| FileCheck %s

#include "tags_test.h"

Expand All @@ -12,6 +11,6 @@ ruleset test09
}
}

// GAIAPLAT-794
// GAIAPLAT-794 (fixed)
// GAIAPLAT-1178
// CHECK: WARNING: Variable declaration hides a tag.
// CHECK: Local variable 'a' hides a tag defined with the same name. Rename your local variable or tag so that their names do not conflict.
2 changes: 1 addition & 1 deletion production/tools/tests/gaiat/tags_test10.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ ruleset test10
}
}

// GAIAPLAT-794
// GAIAPLAT-794 (fixed)
// GAIAPLAT-1178
// CHECK: Local variable 'a' hides a tag defined with the same name. Rename your local variable or tag so that their names do not conflict.
25 changes: 25 additions & 0 deletions production/tools/tests/gaiat/tags_test29.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// RUN: not %gaiat %s -- 2>&1| FileCheck %s

#include "tags_test.h"

class sensor_t
{
float value;
};

ruleset test29
{
on_update(incubator)
{
for(/s2 : sensor)
{
incubator.connect(s2);

sensor_t s2;
incubator.connect(s2);
}
}
}

// GAIAPLAT-1178
// CHECK: Local variable 's2' hides a tag defined with the same name. Rename your local variable or tag so that their names do not conflict.
14 changes: 14 additions & 0 deletions production/tools/tests/gaiat/tags_test30.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// RUN: not %gaiat %s -- 2>&1| FileCheck %s

#include "tags_test.h"

ruleset test30
{
on_update(i:incubator)
{
int i = 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

}

// GAIAPLAT-1178
// CHECK: Local variable 'i' hides a tag defined with the same name. Rename your local variable or tag so that their names do not conflict.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ ruleset test131
}
}

// GAIAPLAT-877
// GAIAPLAT-877 (fixed)
ruleset test132
{
on_insert(animal)
Expand Down