tests/eolian/data/no_nmsp.eo \
tests/eolian/data/import.eo \
tests/eolian/data/decl.eo \
+tests/eolian/data/docs.eo \
tests/eolian/data/import_types.eot
EOLIAN_TESTS_EOS_GENERATED = \
--- /dev/null
+struct Foo {
+ [[This is struct Foo.
+
+ This is a longer description for struct Foo.
+ ]]
+ field1: int; [[Field documentation.]]
+ field2: float;
+ field3: short; [[Another field documentation.]]
+}
+
+enum Bar {
+ [[Docs for enum Bar.]]
+ blah = 0,
+ foo = 1, [[Docs for foo.]]
+ bar = 2 [[Docs for bar.]]
+}
+
+type Alias: Bar; [[Docs for typedef.
+
+ More docs for typedef.
+ See @Bar.
+ ]]
+
+var pants: int = 150; [[Docs for var.]]
+
+struct Opaque; [[Opaque struct docs. See @Foo for another struct.]]
+
+class Docs {
+ [[Docs for class.
+
+ More docs for class.
+ @Foo
+ @Bar
+ @Alias
+ @pants
+ ]]
+ methods {
+ meth {
+ [[Method documentation.]]
+ params {
+ @in a: int; [[Param documentation.]]
+ @out b: float;
+ @out c: long; [[Another param documentation.]]
+ }
+ return: int; [[Return documentation.]]
+ }
+ @property prop {
+ [[Property common documentation.]]
+ get {
+ [[Get documentation.]]
+ }
+ set {
+ [[Set documentation.]]
+ }
+ values {
+ val: int; [[Value documentation.]]
+ }
+ }
+ }
+ events {
+ clicked; [[Event docs.]]
+ }
+}
}
END_TEST
+START_TEST(eolian_docs)
+{
+ eolian_init();
+
+ fail_if(!eolian_directory_scan(PACKAGE_DATA_DIR"/data"));
+
+ fail_if(!eolian_file_parse(PACKAGE_DATA_DIR"/data/docs.eo"));
+ fail_if(!eolian_class_get_by_name("Docs"));
+
+ eolian_shutdown();
+}
+END_TEST
+
void eolian_parsing_test(TCase *tc)
{
tcase_add_test(tc, eolian_simple_parsing);
tcase_add_test(tc, eolian_null);
tcase_add_test(tc, eolian_import);
tcase_add_test(tc, eolian_decl);
+ tcase_add_test(tc, eolian_docs);
}