diff options
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/integration/basic_functionality/constant.in.osml | 26 | ||||
| -rw-r--r-- | testdata/integration/basic_functionality/constant.out.osxml | 70 | 
2 files changed, 96 insertions, 0 deletions
| 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 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<document> +	<ontology name="test"> +		<struct name="test" root="true"> +			<field> +				<childRef ref="a"/> +				<childRef ref="b"/> +			</field> +		</struct> +		<struct name="a"> +			<primitive type="color.color"/> +		</struct> +		<struct name="b"> +			<primitive type="color.multipleColors"/> +		</struct> +	</ontology> +	<typesystem name="color"> +		<struct name="color"> +			<field name="r" type="int"/> +			<field name="g" type="int"/> +			<field name="b" type="int"/> +		</struct> +		<struct name="multipleColors"> +			<field default="[ +	0, +	255, +	0 +]" name="c1" type="color"/> +			<field default="[ +	255, +	0, +	0 +]" name="c2" type="color"/> +		</struct> +		<constant name="green" type="color" value="[ +	0, +	255, +	0 +]"/> +		<constant name="red" type="color" value="[ +	255, +	0, +	0 +]"/> +	</typesystem> +	<test:test> +		<test:a>[ +	"b"= 0, +	"g"= 0, +	"r"= 255 +]</test:a> +		<test:a>[ +	"b"= 0, +	"g"= 255, +	"r"= 0 +]</test:a> +		<test:b>[ +	"c1"= [ +		0, +		255, +		0 +	], +	"c2"= [ +		100, +		20, +		30 +	] +]</test:b> +	</test:test> +</document> | 
