From c3b759273c95f9d38ecde2d36ecb0350f9cc4bff Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Wed, 15 Apr 2015 00:35:49 +0200 Subject: Added integration tests for constant resolution --- .../basic_functionality/constant.in.osml | 26 ++++++++ .../basic_functionality/constant.out.osxml | 70 ++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 testdata/integration/basic_functionality/constant.in.osml create mode 100644 testdata/integration/basic_functionality/constant.out.osxml diff --git a/testdata/integration/basic_functionality/constant.in.osml b/testdata/integration/basic_functionality/constant.in.osml new file mode 100644 index 0000000..b203533 --- /dev/null +++ b/testdata/integration/basic_functionality/constant.in.osml @@ -0,0 +1,26 @@ +\document +\typesystem#color + \struct#color + \field#r[type=int] + \field#g[type=int] + \field#b[type=int] + \constant#green[type=color, value=[r=0,g=255,b=0]] + \constant#red[type=color, value=[r=255,g=0,b=0]] + \struct#multipleColors + \field#c1[type=color,default=green] + \field#c2[type=color,default=red] +\ontology#test + \struct#test[root=true] + \field + \childRef[ref=a] + \childRef[ref=b] + \struct#a + \primitive[type=color] + \struct#b + \primitive[type=multipleColors] + +\begin{test} + \a{red} + \a{green} + \b{[c2=[100, 20, 30]]} +\end{test} diff --git a/testdata/integration/basic_functionality/constant.out.osxml b/testdata/integration/basic_functionality/constant.out.osxml new file mode 100644 index 0000000..12f8247 --- /dev/null +++ b/testdata/integration/basic_functionality/constant.out.osxml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [ + "b"= 0, + "g"= 0, + "r"= 255 +] + [ + "b"= 0, + "g"= 255, + "r"= 0 +] + [ + "c1"= [ + 0, + 255, + 0 + ], + "c2"= [ + 100, + 20, + 30 + ] +] + + -- cgit v1.2.3