gem5 v24.0.0.0
Loading...
Searching...
No Matches
globals.test.cc File Reference
#include <gmock/gmock.h>
#include <gtest/gtest-spi.h>
#include <gtest/gtest.h>
#include <string>
#include "base/gtest/cur_tick_fake.hh"
#include "base/gtest/logging.hh"
#include "base/gtest/serialization_fixture.hh"
#include "sim/globals.hh"

Go to the source code of this file.

Namespaces

namespace  gem5
 Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
 

Typedefs

using GlobalsSerializationFixture = SerializationFixture
 
using GlobalsSerializationFixtureDeathTest = GlobalsSerializationFixture
 

Functions

 TEST_F (GlobalsSerializationFixture, Serialization)
 Test serialization.
 
 TEST_F (GlobalsSerializationFixture, Unserialization)
 Test unserialization.
 
 TEST_F (GlobalsSerializationFixture, UnserializationCptNoVersionTags)
 Test that unserialization fails when there are no version tags in the checkpoint.
 
 TEST_F (GlobalsSerializationFixture, UnserializationCptMissingVersionTags)
 Test that a warning is thrown when the cpt misses any of gem5's tags.
 
 TEST_F (GlobalsSerializationFixture, UnserializationGem5MissingVersionTags)
 Test that a warning is thrown when gem5 misses any of the cpt's tags.
 
 TEST_F (GlobalsSerializationFixtureDeathTest, UnserializationCptNoCurTick)
 Test that unserialization fails when there are is no cur tick in the checkpoint.
 

Variables

GTestTickHandler tickHandler
 

Typedef Documentation

◆ GlobalsSerializationFixture

◆ GlobalsSerializationFixtureDeathTest

Function Documentation

◆ TEST_F() [1/6]

◆ TEST_F() [2/6]

TEST_F ( GlobalsSerializationFixture ,
Unserialization  )

◆ TEST_F() [3/6]

TEST_F ( GlobalsSerializationFixture ,
UnserializationCptMissingVersionTags  )

Test that a warning is thrown when the cpt misses any of gem5's tags.

Definition at line 118 of file globals.test.cc.

References gem5::gtestLogOutput, gem5::MipsISA::scs, gem5::Globals::unserialize(), gem5::Globals::unserializedCurTick, and gem5::version_tags.

◆ TEST_F() [4/6]

TEST_F ( GlobalsSerializationFixture ,
UnserializationCptNoVersionTags  )

Test that unserialization fails when there are no version tags in the checkpoint.

Definition at line 100 of file globals.test.cc.

References gem5::gtestLogOutput, gem5::MipsISA::scs, gem5::Globals::unserialize(), gem5::Globals::unserializedCurTick, and gem5::version_tags.

◆ TEST_F() [5/6]

TEST_F ( GlobalsSerializationFixture ,
UnserializationGem5MissingVersionTags  )

Test that a warning is thrown when gem5 misses any of the cpt's tags.

Definition at line 137 of file globals.test.cc.

References gem5::gtestLogOutput, gem5::MipsISA::scs, gem5::Globals::unserialize(), gem5::Globals::unserializedCurTick, and gem5::version_tags.

◆ TEST_F() [6/6]

TEST_F ( GlobalsSerializationFixtureDeathTest ,
UnserializationCptNoCurTick  )

Test that unserialization fails when there are is no cur tick in the checkpoint.

Definition at line 158 of file globals.test.cc.

References gem5::MipsISA::scs, and gem5::Globals::unserialize().

Variable Documentation

◆ tickHandler

GTestTickHandler tickHandler

Definition at line 48 of file globals.test.cc.

Referenced by TEST_F().


Generated on Tue Jun 18 2024 16:24:08 for gem5 by doxygen 1.11.0