StudyPlanner/src/test.c

37 lines
653 B
C
Raw Normal View History

#include "config.h"
#include "db.h"
#include "iCal.h"
#include "llist.h"
#include "planner.h" // for subject and event structs
#include "ui.h"
#include <stdio.h>
#include <stdlib.h>
int main() {
time_t now = time(NULL);
Task *t1 = newTask("LinAlg", now, now + days(5), 3, 0);
Task t2 = {
.name = "Phys", .created = now, .deadline = now + days(2), .priority = 7};
// create plan
// planner([t1,t2])
//
printf("%s\n", ctime(&now));
llist *list1 = llistNew(t1, cmpTask);
llistAppend(list1, &t2);
llist *found = llistGet(list1, &t2);
serialize(t1);
serialize(&t2);
serialize(found->data);
free(t1);
return 0;
}