-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks_test.vala
28 lines (20 loc) · 889 Bytes
/
tasks_test.vala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using Tasks;
class TasksTest : GLib.Object {
public static int main (string[] args) {
Task task1 = new Task ("buy new helmet");
var long_time = (task1 is LongTimeTask) ? "LongTimeTask" : "Task";
stdout.printf("Added new %s: ", long_time);
stdout.printf(@"$task1\n");
Task task2 = new Task.with_state ("buy new helmet", true);
long_time = (task2 is LongTimeTask) ? "LongTimeTask" : "Task";
stdout.printf("Added new %s: ", long_time);
stdout.printf(@"$task2\n");
LongTimeTask task3 = new LongTimeTask.with_progress("test new helmet", 89);
long_time = (task3 is LongTimeTask) ? "LongTimeTask" : "Task";
stdout.printf("Added new %s: ", long_time);
stdout.printf(@"$task3\n");
task3.progress = 34;
stdout.printf(@"Updated progress: $task3\n");
return 0;
}
}