gem5 v24.0.0.0
|
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <iostream>
#include <sstream>
#include <streambuf>
#include "base/gtest/logging.hh"
#include "sim/port.hh"
Go to the source code of this file.
Classes | |
class | TestPort |
Functions | |
TEST (PortTest, GetId) | |
Test getting the port id. | |
TEST (PortTest, OneSidedConnection) | |
Test connecting one of the ports. | |
TEST (PortTest, TwoSidedConnection) | |
Test connecting both ports. | |
TEST (PortTest, OverwriteConnection) | |
Test that manually overwriting a bind is possible. | |
TEST (PortDeathTest, TakeOverNoPort) | |
Test that a take over must have a valid port. | |
TEST (PortDeathTest, TakeOverDisconnected) | |
Test that a port that is not connected cannot be taken over from. | |
TEST (PortDeathTest, TakeOverConnected) | |
Test that a port that is already connected cannot take over another port. | |
TEST (PortDeathTest, TakeOverOneSided) | |
Test that the peer of the port being taken over from must also be connected. | |
TEST (PortTest, TakeOverOneSided) | |
Test one-sided take over. | |
TEST (PortTest, TakeOver) | |
Test proper take over. | |
TEST (PortTest, Print) | |
Test that the ostream operator prints the port's name. | |
TEST | ( | PortDeathTest | , |
TakeOverConnected | ) |
Test that a port that is already connected cannot take over another port.
Before the take over the connections are: port -> port2
Definition at line 158 of file port.test.cc.
TEST | ( | PortDeathTest | , |
TakeOverDisconnected | ) |
Test that a port that is not connected cannot be taken over from.
Definition at line 143 of file port.test.cc.
TEST | ( | PortDeathTest | , |
TakeOverNoPort | ) |
Test that a take over must have a valid port.
Definition at line 132 of file port.test.cc.
References gem5::Port::takeOverFrom().
TEST | ( | PortDeathTest | , |
TakeOverOneSided | ) |
Test that the peer of the port being taken over from must also be connected.
Before the take over the connections are: port2 -> port3
Definition at line 174 of file port.test.cc.
TEST | ( | PortTest | , |
GetId | ) |
Test getting the port id.
Definition at line 47 of file port.test.cc.
References gem5::Port::getId().
TEST | ( | PortTest | , |
OneSidedConnection | ) |
Test connecting one of the ports.
Definition at line 55 of file port.test.cc.
References gem5::Port::isConnected().
TEST | ( | PortTest | , |
OverwriteConnection | ) |
Test that manually overwriting a bind is possible.
Definition at line 107 of file port.test.cc.
References gem5::Port::isConnected().
TEST | ( | PortTest | , |
) |
Test that the ostream operator prints the port's name.
Definition at line 227 of file port.test.cc.
TEST | ( | PortTest | , |
TakeOver | ) |
Test proper take over.
Before the take over the connections are: port2 <-> port3 After the take over the connections are: port <-> port3
Definition at line 213 of file port.test.cc.
References gem5::Port::bind(), gem5::Port::getPeer(), and gem5::Port::isConnected().
TEST | ( | PortTest | , |
TakeOverOneSided | ) |
Test one-sided take over.
This might be a bug caused by the fact that a bind() does not automatically bind both ports.
Before the take over the connections are: port2 -> port3 -> port4 After the take over the connections are: port <-> port3
Definition at line 192 of file port.test.cc.
References gem5::Port::isConnected().
TEST | ( | PortTest | , |
TwoSidedConnection | ) |
Test connecting both ports.
Definition at line 78 of file port.test.cc.
References gem5::Port::bind(), gem5::Port::getPeer(), gem5::Port::isConnected(), and gem5::Port::unbind().