summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2017-11-15 17:23:37 +0100
committerDominik Holland <dominik.holland@pelagicore.com>2017-11-24 08:49:42 +0000
commit010b4544b91bb935c4179f32a55a9f54dcd42849 (patch)
tree8721a5c87760f35fff56ea7abb003edebd54e96b /tests
parent209784f9e2680e17e9727ca4d0c2c46e71270f07 (diff)
downloadqtivi-010b4544b91bb935c4179f32a55a9f54dcd42849.tar.gz
Add fixes that enable the use of struct members in interfaces
Add fixes for using structs in interfaces. Previously struct members for interfaces would not work because of missing includes. Add a filter function to the generator that lists structs an interface or a struct are depending on. Extend the echo testcase to use structs in more complex ways. Change-Id: I144903ba487a845d1182f90c4318e1187986a7fd Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/core/ivigenerator/org.example.echo.qface15
-rw-r--r--tests/auto/core/ivigenerator/org.example.echo.yaml4
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/core/ivigenerator/org.example.echo.qface b/tests/auto/core/ivigenerator/org.example.echo.qface
index f9db973..a4d36b7 100644
--- a/tests/auto/core/ivigenerator/org.example.echo.qface
+++ b/tests/auto/core/ivigenerator/org.example.echo.qface
@@ -31,10 +31,14 @@ interface Echo {
real floatValue2;
string stringValue;
model<Contact> contactList;
+ Contact contact;
WeekDay weekDay;
string echo(string msg);
string id() const;
+ Combo getCombo();
+ signal anotherChanged(AnotherStruct another);
+ signal foobar(string foo);
}
@config: {id: "org.foo.idz.1.0", zoned: true}
@@ -59,9 +63,11 @@ interface EchoZoned {
@config_simulator: {minimum: 10., maximum: 15.}
int rangedValue;
int rangedValueWithDefault;
+ Contact contact;
string echo(string msg);
string id();
+ Combo getCombo();
}
/**
@@ -99,3 +105,12 @@ struct Contact {
int age;
bool isMarried;
}
+
+struct Combo {
+ Contact contactInfo;
+ WeekDay day;
+}
+
+struct AnotherStruct {
+ int justANumber;
+}
diff --git a/tests/auto/core/ivigenerator/org.example.echo.yaml b/tests/auto/core/ivigenerator/org.example.echo.yaml
index 7ae5701..8eebd10 100644
--- a/tests/auto/core/ivigenerator/org.example.echo.yaml
+++ b/tests/auto/core/ivigenerator/org.example.echo.yaml
@@ -40,3 +40,7 @@ org.example.echo.Echo#intValue:
default_value: 61
range_high: 150
range_low: 0
+
+org.example.echo.EchoZoned#contact:
+ config_simulator:
+ zoned: true