forked from enlightenment/efl
eolian: initial test file for docs (no APIs to test yet)
This commit is contained in:
parent
5084938c04
commit
0c729faf68
|
@ -96,6 +96,7 @@ tests/eolian/data/null.eo \
|
|||
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 = \
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
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.]]
|
||||
}
|
||||
}
|
|
@ -1128,6 +1128,19 @@ START_TEST(eolian_decl)
|
|||
}
|
||||
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);
|
||||
|
@ -1148,5 +1161,6 @@ void eolian_parsing_test(TCase *tc)
|
|||
tcase_add_test(tc, eolian_null);
|
||||
tcase_add_test(tc, eolian_import);
|
||||
tcase_add_test(tc, eolian_decl);
|
||||
tcase_add_test(tc, eolian_docs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue