summaryrefslogtreecommitdiff
path: root/Testing/include/modeling/MachineTest.h
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2017-07-09 23:48:06 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2017-07-09 23:48:06 +0200
commitc94d0c347fdbd8acc774df4ac17617a3f63e4507 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /Testing/include/modeling/MachineTest.h
parentbc4c41e21a64b444bdbab3b6d1d407fd5d919419 (diff)
Delete old codebase
This change removes version 1 of the OpenDC simulator codebase as it will be replaced by a complete rewrite in the Kotlin language.
Diffstat (limited to 'Testing/include/modeling/MachineTest.h')
-rw-r--r--Testing/include/modeling/MachineTest.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/Testing/include/modeling/MachineTest.h b/Testing/include/modeling/MachineTest.h
deleted file mode 100644
index 6bba9d0d..00000000
--- a/Testing/include/modeling/MachineTest.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#pragma once
-#include "modeling\Machine.h"
-
-#include <gtest\gtest.h>
-
-TEST(MachineTest, GetSpeed)
-{
- Modeling::Machine m(100);
-
- ASSERT_EQ(m.getSpeed(), 100);
-}
-
-TEST(MachineTest, IsBusy)
-{
- Modeling::Machine m(100);
- std::shared_ptr<Simulation::Workload> shrdWorkload = std::make_shared<Simulation::Workload>(150, 1, 1, 1);
- ASSERT_FALSE(m.isBusy());
-
- m.giveTask(std::weak_ptr<Simulation::Workload>(shrdWorkload));
-
- ASSERT_TRUE(m.isBusy());
-}
-
-TEST(MachineTest, Tick)
-{
- Modeling::Machine m(100);
- std::shared_ptr<Simulation::Workload> shrdWorkload = std::make_shared<Simulation::Workload>(150, 1, 1, 1);
- m.giveTask(std::weak_ptr<Simulation::Workload>(shrdWorkload));
-
- ASSERT_TRUE(m.isBusy());
-
- m.tick();
-
- ASSERT_TRUE(m.isBusy());
-
- m.tick();
-
- ASSERT_FALSE(m.isBusy());
-} \ No newline at end of file