updated chemical test to use file now
This commit is contained in:
parent
b2aec6be00
commit
0e83921632
3 changed files with 6 additions and 5 deletions
|
|
@ -373,7 +373,7 @@ void ARC_Chemical_Create(ARC_Chemical **chemical){
|
||||||
|
|
||||||
/* ~ define the language as a string ~ */
|
/* ~ define the language as a string ~ */
|
||||||
char *languageCString =
|
char *languageCString =
|
||||||
"<language> -> <group> <language> | <variableLines> <language> | LAMBDA\n"
|
"<language> -> <group> <language> | <variableLines> <language> | <whitespace>\n"
|
||||||
|
|
||||||
"<group> -> <whitespace> <groupName> <whitespace> <variable> <whitespace> OPEN_CURLY_BRACE <groupArgs> <whitespace> CLOSE_CURLY_BRACE\n"
|
"<group> -> <whitespace> <groupName> <whitespace> <variable> <whitespace> OPEN_CURLY_BRACE <groupArgs> <whitespace> CLOSE_CURLY_BRACE\n"
|
||||||
"<groupName> -> <variable>\n"
|
"<groupName> -> <variable>\n"
|
||||||
|
|
|
||||||
3
tests/res/std/chemical/first.chemical
Normal file
3
tests/res/std/chemical/first.chemical
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
group test {
|
||||||
|
int32 test = 5;
|
||||||
|
}
|
||||||
|
|
@ -10,12 +10,10 @@ ARC_TEST(Chemical_BasicTest){
|
||||||
|
|
||||||
ARC_CHECK(arc_errno == 0);
|
ARC_CHECK(arc_errno == 0);
|
||||||
|
|
||||||
//char *tempCString = "int32 test = 5;";
|
char *tempCString = "tests/res/std/chemical/first.chemical";
|
||||||
char *tempCString = "group test { int32 test = 5; }";
|
|
||||||
//char *tempCString = "group test { }";
|
|
||||||
ARC_String *tempString;
|
ARC_String *tempString;
|
||||||
ARC_String_CreateWithStrlen(&tempString, tempCString);
|
ARC_String_CreateWithStrlen(&tempString, tempCString);
|
||||||
ARC_Chemical_LoadFromString(chemical, &tempString);
|
ARC_Chemical_LoadFromFile(chemical, tempString);
|
||||||
|
|
||||||
//cleanup
|
//cleanup
|
||||||
ARC_Chemical_Destroy(chemical);
|
ARC_Chemical_Destroy(chemical);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue