gem5
v20.1.0.0
|
#include <gtest/gtest.h>
#include <initializer_list>
#include <iostream>
#include <vector>
#include "base/fiber.hh"
Go to the source code of this file.
Classes | |
class | SwitchingFiber |
class | LinkedFiber |
Functions | |
TEST (Fiber, Starting) | |
This test is checking if the "started" member has its expected value before and after the fiber runs. More... | |
SwitchingFiber | a ("A", { &b, &a, Fiber::primaryFiber(), &b, &c }) |
SwitchingFiber | b ("B", { &a, &c }) |
SwitchingFiber | c ("C", { &a, Fiber::primaryFiber(), Fiber::primaryFiber() }) |
TEST (Fiber, Switching) | |
TEST (Fiber, Linked) | |
Variables | |
SwitchingFiber | a |
SwitchingFiber | b |
SwitchingFiber | c |
std::vector< SwitchingFiber * >::iterator | expectedIt |
std::vector< SwitchingFiber * > | expected ({ &a, &b, &a, &a, &a, &b, &c, &a, &c, &c, &c }) |
int | currentIndex = 0 |
SwitchingFiber a | ( | "A" | , |
{ &b, &a, Fiber::primaryFiber(), &b, &c } | |||
) |
SwitchingFiber b | ( | "B" | , |
{ &a, &c } | |||
) |
SwitchingFiber c | ( | "C" | , |
{ &a, Fiber::primaryFiber(), Fiber::primaryFiber() } | |||
) |
TEST | ( | Fiber | , |
Linked | |||
) |
Definition at line 161 of file fiber.test.cc.
References currentIndex, EXPECT_EQ, Fiber::primaryFiber(), and Fiber::run().
TEST | ( | Fiber | , |
Starting | |||
) |
This test is checking if the "started" member has its expected value before and after the fiber runs.
In the test an empty fiber is used since we are just interested on the _started member and nothing more.
Do nothing
Definition at line 53 of file fiber.test.cc.
References Fiber::Fiber(), Fiber::main(), and Fiber::primaryFiber().
TEST | ( | Fiber | , |
Switching | |||
) |
Definition at line 121 of file fiber.test.cc.
References a, b, c, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, expected, expectedIt, Fiber::finished(), and Fiber::run().
SwitchingFiber a("A", { &b, &a, Fiber::primaryFiber(), &b, &c }) |
Referenced by TEST().
SwitchingFiber b("B", { &a, &c }) |
Referenced by TEST().
SwitchingFiber c("C", { &a, Fiber::primaryFiber(), Fiber::primaryFiber() }) |
Referenced by TEST().
int currentIndex = 0 |
Definition at line 145 of file fiber.test.cc.
Referenced by LinkedFiber::main(), and TEST().
Referenced by accessed(), SwitchingFiber::checkExpected(), BackingStore::expect_accesses(), and TEST().
std::vector<SwitchingFiber *>::iterator expectedIt |
Definition at line 91 of file fiber.test.cc.
Referenced by SwitchingFiber::checkExpected(), and TEST().