From ac5c09f2783b282485c38ebf9c4ba91d5faff5a4 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Tue, 21 Aug 2007 17:33:19 +0200 Subject: [PATCH] TDD? TDB! Test-Driven-Brainstorming --- tests/10timefunctions.tests | 18 ++++++++++++++++++ tests/20threads.tests | 5 +++++ tests/30backend-file.tests | 28 ++++++++++++++++++++++++++++ tests/30backend-scheduler.tests | 13 +++++++++++++ tests/30backend-threadpool.tests | 6 ++++++ 5 files changed, 70 insertions(+) create mode 100644 tests/10timefunctions.tests create mode 100644 tests/20threads.tests create mode 100644 tests/30backend-file.tests create mode 100644 tests/30backend-scheduler.tests create mode 100644 tests/30backend-threadpool.tests diff --git a/tests/10timefunctions.tests b/tests/10timefunctions.tests new file mode 100644 index 000000000..764d91fd8 --- /dev/null +++ b/tests/10timefunctions.tests @@ -0,0 +1,18 @@ + +TESTING "Time functions" + +PLANNED "get time" +PLANNED "add time, normalized" +PLANNED "substract time, normalized" + + +# the next ones for different common framerates, check corner cases +PLANNED "time to frame" +PLANNED "frame to time" + + +# how long are N frames on average (beware of precision!) +PLANNED "frame duration" + +# how much frames fall in a certain timerange +PLANNED "frames in range" diff --git a/tests/20threads.tests b/tests/20threads.tests new file mode 100644 index 000000000..db497a178 --- /dev/null +++ b/tests/20threads.tests @@ -0,0 +1,5 @@ +TESTING "Threads" + +PLANNED "join" +PLANNED "detached" +PLANNED "cancel" diff --git a/tests/30backend-file.tests b/tests/30backend-file.tests new file mode 100644 index 000000000..e650d42ee --- /dev/null +++ b/tests/30backend-file.tests @@ -0,0 +1,28 @@ + +TESTING "File backend" + + +PLANNED "File handle management" + + +PLANNED "open nonexisting file for reading" + + +PLANNED "create file" + + +PLANNED "open existing file for reading" + + +PLANNED "open existing file for writing" + + +PLANNED "Test, access nonexistent file for reading" + + +PLANNED "write frames" + + +PLANNED "read frames" + + diff --git a/tests/30backend-scheduler.tests b/tests/30backend-scheduler.tests new file mode 100644 index 000000000..77a1af7f1 --- /dev/null +++ b/tests/30backend-scheduler.tests @@ -0,0 +1,13 @@ +TESTING "Scheduler" + +PLANNED "high pri ticks" +PLANNED "high pri, time ran out" +PLANNED "high pri, cancel task" + +PLANNED "low pri ticks" +PLANNED "low pri, time ran out" +PLANNED "low pri, cancel task" + +PLANNED "change priority low->high" + + diff --git a/tests/30backend-threadpool.tests b/tests/30backend-threadpool.tests new file mode 100644 index 000000000..dc178ba91 --- /dev/null +++ b/tests/30backend-threadpool.tests @@ -0,0 +1,6 @@ + +TESTING "Thread Pools" + +PLANNED "create" +PLANNED "yield" +PLANNED "cancel"