API for task log and scheduled task (#25)

* API revision

* update

* make status a bitmap

* update api

* tests working

* new task log APIs

* update APIs

* write binary structures to redis

* update tests

* fix clang-format

* Fix formatting.
This commit is contained in:
Philipp Moritz
2016-09-29 21:12:06 -07:00
committed by Robert Nishihara
parent 084220b0e7
commit e21e9f68df
12 changed files with 307 additions and 215 deletions
-19
View File
@@ -63,28 +63,9 @@ TEST send_task(void) {
PASS();
}
TEST print_and_parse_task(void) {
task_spec *task = example_task();
UT_string *output;
utstring_new(output);
print_task(task, output);
task_spec *result = parse_task(utstring_body(output), utstring_len(output));
utstring_free(output);
ASSERT_EQ(task_size(task), task_size(result));
ASSERT(memcmp(task, result, task_size(task)) == 0);
free_task_spec(task);
free_task_spec(result);
PASS();
}
SUITE(task_tests) {
RUN_TEST(task_test);
RUN_TEST(send_task);
RUN_TEST(print_and_parse_task);
}
GREATEST_MAIN_DEFS();