cool stuff
This commit is contained in:
15
test/test.c
Normal file
15
test/test.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <ground.h>
|
||||
|
||||
int main() {
|
||||
GroundProgram program = Ground.New.Program();
|
||||
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||||
GroundState state = {NULL, NULL, NULL};
|
||||
GroundInstruction instruction = Ground.New.Instruction(GroundInstruction_ADD);
|
||||
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||||
Ground.Instruction.append(&instruction, Ground.New.Arg.Value(Ground.New.Value.Int(2)));
|
||||
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||||
Ground.Instruction.append(&instruction, Ground.New.Arg.Value(Ground.New.Value.Int(2)));
|
||||
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||||
Ground.Program.execute(&program, &state);
|
||||
printf(Ground.Flags.error ? "true\n" : "false\n");
|
||||
}
|
||||
Reference in New Issue
Block a user