gem5  v20.0.0.3
Functions
addr_range.test.cc File Reference
#include <gtest/gtest.h>
#include <cmath>
#include "base/addr_range.hh"
#include "base/bitfield.hh"

Go to the source code of this file.

Functions

 TEST (AddrRangeTest, ValidRange)
 
 TEST (AddrRangeTest, EmptyRange)
 
 TEST (AddrRangeTest, RangeSizeOfOne)
 
 TEST (AddrRangeTest, Range16Bit)
 
 TEST (AddrRangeTest, InvalidRange)
 
 TEST (AddrRangeTest, LessThan)
 
 TEST (AddrRangeTest, EqualToNotEqualTo)
 
 TEST (AddrRangeTest, MergesWith)
 
 TEST (AddrRangeTest, DoesNotMergeWith)
 
 TEST (AddrRangeTest, IntersectsCompleteOverlap)
 
 TEST (AddrRangeTest, IntersectsAddressWithin)
 
 TEST (AddrRangeTest, IntersectsPartialOverlap)
 
 TEST (AddrRangeTest, IntersectsNoOverlap)
 
 TEST (AddrRangeTest, IntersectsFirstLastAddressOverlap)
 
 TEST (AddrRangeTest, isSubsetCompleteOverlap)
 
 TEST (AddrRangeTest, isSubsetNoOverlap)
 
 TEST (AddrRangeTest, isSubsetTrueSubset)
 
 TEST (AddrRangeTest, isSubsetPartialSubset)
 
 TEST (AddrRangeTest, isSubsetInterleavedCompleteOverlap)
 
 TEST (AddrRangeTest, isSubsetInterleavedNoOverlap)
 
 TEST (AddrRangeTest, isSubsetInterleavedPartialOverlap)
 
 TEST (AddrRangeTest, Contains)
 
 TEST (AddrRangeTest, ContainsInAnEmptyRange)
 
 TEST (AddrRangeTest, RemoveIntlvBits)
 
 TEST (AddrRangeTest, addIntlvBits)
 
 TEST (AddrRangeTest, OffsetInRange)
 
 TEST (AddrRangeTest, OffsetOutOfRangeAfter)
 
 TEST (AddrRangeTest, OffsetOutOfRangeBefore)
 
 TEST (AddrRangeTest, LsbInterleavingMask)
 
 TEST (AddrRangeTest, TwoInterleavingMasks)
 
 TEST (AddrRangeTest, ComplexInterleavingMasks)
 
 TEST (AddrRangeTest, InterleavingAddressesMergesWith)
 
 TEST (AddrRangeTest, InterleavingAddressesDoNotMergeWith)
 
 TEST (AddrRangeTest, InterleavingAddressesDoNotIntersect)
 
 TEST (AddrRangeTest, InterleavingAddressesIntersectsViaMerging)
 
 TEST (AddrRangeTest, InterleavingAddressesDoesNotIntersectViaMerging)
 
 TEST (AddrRangeTest, DISABLED_InterleavingAddressesIntersect)
 
 TEST (AddrRangeTest, DISABLED_InterleavingAddressesIntersectsOnOneByteAddress)
 
 TEST (AddrRangeTest, DISABLED_InterleavingAddressesDoesNotIntersectOnOneByteAddress)
 
 TEST (AddrRangeTest, DISABLED_InterleavingAddressIsSubset)
 
 TEST (AddrRangeTest, DISABLED_InterleavingAddressIsNotSubset)
 
 TEST (AddrRangeTest, DISABLED_InterleavingAddressContains)
 
 TEST (AddrRangeTest, InterleavingAddressAddRemoveInterlvBits)
 
 TEST (AddrRangeTest, InterleavingAddressAddRemoveInterlvBitsTwoMasks)
 
 TEST (AddrRangeTest, AddRemoveInterleavBitsAcrossRange)
 
 TEST (AddrRangeTest, InterleavingAddressesGetOffset)
 
 TEST (AddrRangeTest, InterleavingLessThanStartEquals)
 
 TEST (AddrRangeTest, InterleavingLessThanStartNotEquals)
 
 TEST (AddrRangeTest, InterleavingEqualTo)
 
 TEST (AddrRangeTest, InterleavingNotEqualTo)
 
 TEST (AddrRangeTest, MergingInterleavingAddressRanges)
 
 TEST (AddrRangeTest, MergingInterleavingAddressRangesOneRange)
 
 TEST (AddrRangeTest, LegacyConstructorNoInterleaving)
 
 TEST (AddrRangeTest, LegacyConstructorOneBitMask)
 
 TEST (AddrRangeTest, LegacyConstructorTwoBitMask)
 
 TEST (AddrRangeTest, LegacyConstructorTwoBitMaskWithXOR)
 
 TEST (AddrRangeTest, RangeExConstruction)
 
 TEST (AddrRangeTest, RangeInConstruction)
 
 TEST (AddrRangeTest, RangeSizeConstruction)
 

Function Documentation

◆ TEST() [1/59]

TEST ( AddrRangeTest  ,
ValidRange   
)

Definition at line 46 of file addr_range.test.cc.

References EXPECT_FALSE, MipsISA::r, and AddrRange::valid().

◆ TEST() [2/59]

TEST ( AddrRangeTest  ,
EmptyRange   
)

◆ TEST() [3/59]

TEST ( AddrRangeTest  ,
RangeSizeOfOne   
)

◆ TEST() [4/59]

TEST ( AddrRangeTest  ,
Range16Bit   
)

◆ TEST() [5/59]

TEST ( AddrRangeTest  ,
InvalidRange   
)

Definition at line 113 of file addr_range.test.cc.

References EXPECT_FALSE, MipsISA::r, and AddrRange::valid().

◆ TEST() [6/59]

TEST ( AddrRangeTest  ,
LessThan   
)

Definition at line 119 of file addr_range.test.cc.

References EXPECT_FALSE, and EXPECT_TRUE.

◆ TEST() [7/59]

TEST ( AddrRangeTest  ,
EqualToNotEqualTo   
)

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

References EXPECT_FALSE, and EXPECT_TRUE.

◆ TEST() [8/59]

TEST ( AddrRangeTest  ,
MergesWith   
)

Definition at line 154 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::mergesWith().

◆ TEST() [9/59]

TEST ( AddrRangeTest  ,
DoesNotMergeWith   
)

Definition at line 167 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::mergesWith().

◆ TEST() [10/59]

TEST ( AddrRangeTest  ,
IntersectsCompleteOverlap   
)

Definition at line 176 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::intersects().

◆ TEST() [11/59]

TEST ( AddrRangeTest  ,
IntersectsAddressWithin   
)

Definition at line 185 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::intersects().

◆ TEST() [12/59]

TEST ( AddrRangeTest  ,
IntersectsPartialOverlap   
)

Definition at line 194 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::intersects().

◆ TEST() [13/59]

TEST ( AddrRangeTest  ,
IntersectsNoOverlap   
)

Definition at line 203 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::intersects().

◆ TEST() [14/59]

TEST ( AddrRangeTest  ,
IntersectsFirstLastAddressOverlap   
)

Definition at line 212 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::intersects().

◆ TEST() [15/59]

TEST ( AddrRangeTest  ,
isSubsetCompleteOverlap   
)

Definition at line 225 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::isSubset().

◆ TEST() [16/59]

TEST ( AddrRangeTest  ,
isSubsetNoOverlap   
)

Definition at line 234 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::isSubset().

◆ TEST() [17/59]

TEST ( AddrRangeTest  ,
isSubsetTrueSubset   
)

Definition at line 243 of file addr_range.test.cc.

References EXPECT_FALSE, EXPECT_TRUE, and AddrRange::isSubset().

◆ TEST() [18/59]

TEST ( AddrRangeTest  ,
isSubsetPartialSubset   
)

Definition at line 252 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::isSubset().

◆ TEST() [19/59]

TEST ( AddrRangeTest  ,
isSubsetInterleavedCompleteOverlap   
)

Definition at line 261 of file addr_range.test.cc.

References EXPECT_TRUE.

◆ TEST() [20/59]

TEST ( AddrRangeTest  ,
isSubsetInterleavedNoOverlap   
)

Definition at line 269 of file addr_range.test.cc.

References EXPECT_FALSE.

◆ TEST() [21/59]

TEST ( AddrRangeTest  ,
isSubsetInterleavedPartialOverlap   
)

Definition at line 277 of file addr_range.test.cc.

References EXPECT_FALSE.

◆ TEST() [22/59]

TEST ( AddrRangeTest  ,
Contains   
)

Definition at line 285 of file addr_range.test.cc.

References AddrRange::contains(), EXPECT_FALSE, EXPECT_TRUE, and MipsISA::r.

◆ TEST() [23/59]

TEST ( AddrRangeTest  ,
ContainsInAnEmptyRange   
)

Definition at line 299 of file addr_range.test.cc.

References AddrRange::contains(), EXPECT_FALSE, and MipsISA::r.

◆ TEST() [24/59]

TEST ( AddrRangeTest  ,
RemoveIntlvBits   
)

Definition at line 306 of file addr_range.test.cc.

References ArmISA::a, EXPECT_EQ, MipsISA::r, and AddrRange::removeIntlvBits().

◆ TEST() [25/59]

TEST ( AddrRangeTest  ,
addIntlvBits   
)

Definition at line 319 of file addr_range.test.cc.

References ArmISA::a, AddrRange::addIntlvBits(), EXPECT_EQ, and MipsISA::r.

◆ TEST() [26/59]

TEST ( AddrRangeTest  ,
OffsetInRange   
)

Definition at line 332 of file addr_range.test.cc.

References EXPECT_EQ, AddrRange::getOffset(), and MipsISA::r.

◆ TEST() [27/59]

TEST ( AddrRangeTest  ,
OffsetOutOfRangeAfter   
)

Definition at line 338 of file addr_range.test.cc.

References EXPECT_EQ, AddrRange::getOffset(), MaxAddr, and MipsISA::r.

◆ TEST() [28/59]

TEST ( AddrRangeTest  ,
OffsetOutOfRangeBefore   
)

Definition at line 347 of file addr_range.test.cc.

References EXPECT_EQ, AddrRange::getOffset(), MaxAddr, and MipsISA::r.

◆ TEST() [29/59]

TEST ( AddrRangeTest  ,
LsbInterleavingMask   
)

◆ TEST() [30/59]

TEST ( AddrRangeTest  ,
TwoInterleavingMasks   
)

◆ TEST() [31/59]

TEST ( AddrRangeTest  ,
ComplexInterleavingMasks   
)

◆ TEST() [32/59]

TEST ( AddrRangeTest  ,
InterleavingAddressesMergesWith   
)

Definition at line 430 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::mergesWith().

◆ TEST() [33/59]

TEST ( AddrRangeTest  ,
InterleavingAddressesDoNotMergeWith   
)

Definition at line 449 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::mergesWith().

◆ TEST() [34/59]

TEST ( AddrRangeTest  ,
InterleavingAddressesDoNotIntersect   
)

Definition at line 471 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::intersects().

◆ TEST() [35/59]

TEST ( AddrRangeTest  ,
InterleavingAddressesIntersectsViaMerging   
)

Definition at line 498 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::intersects().

◆ TEST() [36/59]

TEST ( AddrRangeTest  ,
InterleavingAddressesDoesNotIntersectViaMerging   
)

Definition at line 520 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::intersects().

◆ TEST() [37/59]

TEST ( AddrRangeTest  ,
DISABLED_InterleavingAddressesIntersect   
)

Definition at line 556 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::intersects().

◆ TEST() [38/59]

TEST ( AddrRangeTest  ,
DISABLED_InterleavingAddressesIntersectsOnOneByteAddress   
)

Definition at line 583 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::intersects().

◆ TEST() [39/59]

TEST ( AddrRangeTest  ,
DISABLED_InterleavingAddressesDoesNotIntersectOnOneByteAddress   
)

Definition at line 601 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::intersects().

◆ TEST() [40/59]

TEST ( AddrRangeTest  ,
DISABLED_InterleavingAddressIsSubset   
)

Definition at line 626 of file addr_range.test.cc.

References EXPECT_TRUE, and AddrRange::isSubset().

◆ TEST() [41/59]

TEST ( AddrRangeTest  ,
DISABLED_InterleavingAddressIsNotSubset   
)

Definition at line 649 of file addr_range.test.cc.

References EXPECT_FALSE, and AddrRange::isSubset().

◆ TEST() [42/59]

TEST ( AddrRangeTest  ,
DISABLED_InterleavingAddressContains   
)

addr[0] && !addr[4]

Definition at line 673 of file addr_range.test.cc.

References addr, AddrRange::contains(), EXPECT_FALSE, EXPECT_TRUE, and MipsISA::r.

◆ TEST() [43/59]

TEST ( AddrRangeTest  ,
InterleavingAddressAddRemoveInterlvBits   
)

◆ TEST() [44/59]

TEST ( AddrRangeTest  ,
InterleavingAddressAddRemoveInterlvBitsTwoMasks   
)

◆ TEST() [45/59]

TEST ( AddrRangeTest  ,
AddRemoveInterleavBitsAcrossRange   
)

◆ TEST() [46/59]

TEST ( AddrRangeTest  ,
InterleavingAddressesGetOffset   
)

Definition at line 787 of file addr_range.test.cc.

References EXPECT_EQ, AddrRange::getOffset(), and MipsISA::r.

◆ TEST() [47/59]

TEST ( AddrRangeTest  ,
InterleavingLessThanStartEquals   
)

Definition at line 805 of file addr_range.test.cc.

References EXPECT_FALSE, and EXPECT_TRUE.

◆ TEST() [48/59]

TEST ( AddrRangeTest  ,
InterleavingLessThanStartNotEquals   
)

Definition at line 830 of file addr_range.test.cc.

References EXPECT_FALSE, and EXPECT_TRUE.

◆ TEST() [49/59]

TEST ( AddrRangeTest  ,
InterleavingEqualTo   
)

Definition at line 851 of file addr_range.test.cc.

References EXPECT_TRUE.

◆ TEST() [50/59]

TEST ( AddrRangeTest  ,
InterleavingNotEqualTo   
)

Definition at line 870 of file addr_range.test.cc.

References EXPECT_FALSE.

◆ TEST() [51/59]

TEST ( AddrRangeTest  ,
MergingInterleavingAddressRanges   
)

◆ TEST() [52/59]

TEST ( AddrRangeTest  ,
MergingInterleavingAddressRangesOneRange   
)

Definition at line 926 of file addr_range.test.cc.

References EXPECT_EQ, output(), and MipsISA::r.

◆ TEST() [53/59]

TEST ( AddrRangeTest  ,
LegacyConstructorNoInterleaving   
)

Definition at line 963 of file addr_range.test.cc.

References EXPECT_EQ, and expected.

◆ TEST() [54/59]

TEST ( AddrRangeTest  ,
LegacyConstructorOneBitMask   
)

Definition at line 974 of file addr_range.test.cc.

References EXPECT_TRUE, and expected.

◆ TEST() [55/59]

TEST ( AddrRangeTest  ,
LegacyConstructorTwoBitMask   
)

Definition at line 990 of file addr_range.test.cc.

References EXPECT_TRUE, and expected.

◆ TEST() [56/59]

TEST ( AddrRangeTest  ,
LegacyConstructorTwoBitMaskWithXOR   
)

Definition at line 1007 of file addr_range.test.cc.

References AddrRange::contains(), EXPECT_FALSE, EXPECT_TRUE, and ArmISA::i.

◆ TEST() [57/59]

TEST ( AddrRangeTest  ,
RangeExConstruction   
)

Definition at line 1044 of file addr_range.test.cc.

References AddrRange::end(), EXPECT_EQ, MipsISA::r, RangeEx(), and AddrRange::start().

◆ TEST() [58/59]

TEST ( AddrRangeTest  ,
RangeInConstruction   
)

Definition at line 1051 of file addr_range.test.cc.

References AddrRange::end(), EXPECT_EQ, MipsISA::r, RangeIn(), and AddrRange::start().

◆ TEST() [59/59]

TEST ( AddrRangeTest  ,
RangeSizeConstruction   
)

Generated on Fri Jul 3 2020 15:53:08 for gem5 by doxygen 1.8.13