gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
str.test.cc File Reference
#include <gtest/gtest.h>
#include <cstdint>
#include "base/str.hh"

Go to the source code of this file.

Functions

 TEST (StrTest, EatLeadWhite)
 
 TEST (StrTest, EatLeadWhiteNoLeadingWhitespace)
 
 TEST (StrTest, EatEndWhite)
 
 TEST (StrTest, EatEndWhiteNoTrailingWhitespace)
 
 TEST (StrTest, EatWhite)
 
 TEST (StrTest, EatWhiteNoWhitespace)
 
 TEST (StrTest, ToLower)
 
 TEST (StrTest, SplitFirst)
 
 TEST (StrTest, SplitFirstNoChar)
 
 TEST (StrTest, SplitFirstOnFirstChar)
 
 TEST (StrTest, SplitLast)
 
 TEST (StrTest, SplitLastNoChar)
 
 TEST (StrTest, SplitLastOnLastChar)
 
 TEST (StrTest, TokenizeOnSpace)
 
 TEST (StrTest, TokenizeOnSpaceIgnFalse)
 
 TEST (StrTest, TokenizedTokenDoesNotExist)
 
 TEST (StrTest, ToNumber8BitInt)
 
 TEST (StrTest, ToNumber8BitIntStringOutOfRange)
 
 TEST (StrTest, ToNumber8BitIntInvalidString)
 
 TEST (StrTest, ToNumberUnsigned8BitInt)
 
 TEST (StrTest, ToNumberUnsigned8BitIntNegative)
 
 TEST (StrTest, ToNumber64BitInt)
 
 TEST (StrTest, ToNumber64BitIntInvalidString)
 
 TEST (StrTest, ToNumberFloat)
 
 TEST (StrTest, ToNumberFloatIntegerString)
 
 TEST (StrTest, ToNumberFloatNegative)
 
 TEST (StrTest, ToNumberDouble)
 
 TEST (StrTest, ToNumberDoubleIntegerString)
 
 TEST (StrTest, ToNumberDoubleNegative)
 
 TEST (StrTest, ToBoolTrue)
 
 TEST (StrTest, ToBoolFalse)
 
 TEST (StrTest, ToBoolInvalidInput)
 
 TEST (StrTest, QuoteStringNoSpace)
 
 TEST (StrTest, QuoteStringWithSpace)
 
 TEST (StrTest, QuoteQuotedString)
 
 TEST (StrTest, QuoteStringWithTab)
 
 TEST (StrTest, StartswithDoubleStringDoesStartWith)
 
 TEST (StrTest, StartswithDoubleStringDoesNotStartWith)
 
 TEST (StrTest, StartswithDoubleCharArrayDoesStartWith)
 
 TEST (StrTest, StartswithDoubleCharArrayDoesNotStartWith)
 
 TEST (StrTest, StartswithStringCharArrayDoesStartWith)
 
 TEST (StrTest, StartswithStringCharArrayDoesNotStartWith)
 

Function Documentation

◆ TEST() [1/42]

TEST ( StrTest  ,
EatLeadWhite   
)

Definition at line 51 of file str.test.cc.

References eat_lead_white(), EXPECT_EQ, and X86ISA::val.

◆ TEST() [2/42]

TEST ( StrTest  ,
EatLeadWhiteNoLeadingWhitespace   
)

Definition at line 58 of file str.test.cc.

References eat_lead_white(), EXPECT_EQ, and X86ISA::val.

◆ TEST() [3/42]

TEST ( StrTest  ,
EatEndWhite   
)

Definition at line 65 of file str.test.cc.

References eat_end_white(), EXPECT_EQ, and X86ISA::val.

◆ TEST() [4/42]

TEST ( StrTest  ,
EatEndWhiteNoTrailingWhitespace   
)

Definition at line 72 of file str.test.cc.

References eat_end_white(), EXPECT_EQ, and X86ISA::val.

◆ TEST() [5/42]

TEST ( StrTest  ,
EatWhite   
)

Definition at line 79 of file str.test.cc.

References eat_white(), EXPECT_EQ, and X86ISA::val.

◆ TEST() [6/42]

TEST ( StrTest  ,
EatWhiteNoWhitespace   
)

Definition at line 86 of file str.test.cc.

References eat_lead_white(), EXPECT_EQ, and X86ISA::val.

◆ TEST() [7/42]

TEST ( StrTest  ,
ToLower   
)

Definition at line 97 of file str.test.cc.

References EXPECT_EQ, to_lower(), and X86ISA::val.

◆ TEST() [8/42]

TEST ( StrTest  ,
SplitFirst   
)

Definition at line 112 of file str.test.cc.

References EXPECT_EQ, split_first(), and X86ISA::val.

◆ TEST() [9/42]

TEST ( StrTest  ,
SplitFirstNoChar   
)

Definition at line 124 of file str.test.cc.

References EXPECT_EQ, split_first(), and X86ISA::val.

◆ TEST() [10/42]

TEST ( StrTest  ,
SplitFirstOnFirstChar   
)

Definition at line 136 of file str.test.cc.

References EXPECT_EQ, split_first(), and X86ISA::val.

◆ TEST() [11/42]

TEST ( StrTest  ,
SplitLast   
)

Definition at line 148 of file str.test.cc.

References EXPECT_EQ, split_last(), and X86ISA::val.

◆ TEST() [12/42]

TEST ( StrTest  ,
SplitLastNoChar   
)

Definition at line 160 of file str.test.cc.

References EXPECT_EQ, split_last(), and X86ISA::val.

◆ TEST() [13/42]

TEST ( StrTest  ,
SplitLastOnLastChar   
)

Definition at line 172 of file str.test.cc.

References EXPECT_EQ, split_last(), and X86ISA::val.

◆ TEST() [14/42]

TEST ( StrTest  ,
TokenizeOnSpace   
)

Definition at line 189 of file str.test.cc.

References EXPECT_EQ, tokenize(), and X86ISA::val.

◆ TEST() [15/42]

TEST ( StrTest  ,
TokenizeOnSpaceIgnFalse   
)

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

References EXPECT_EQ, tokenize(), and X86ISA::val.

◆ TEST() [16/42]

TEST ( StrTest  ,
TokenizedTokenDoesNotExist   
)

Definition at line 237 of file str.test.cc.

References EXPECT_EQ, tokenize(), and X86ISA::val.

◆ TEST() [17/42]

TEST ( StrTest  ,
ToNumber8BitInt   
)

Definition at line 253 of file str.test.cc.

References EXPECT_EQ, EXPECT_TRUE, output(), and to_number().

◆ TEST() [18/42]

TEST ( StrTest  ,
ToNumber8BitIntStringOutOfRange   
)

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

References EXPECT_FALSE, output(), and to_number().

◆ TEST() [19/42]

TEST ( StrTest  ,
ToNumber8BitIntInvalidString   
)

Definition at line 268 of file str.test.cc.

References EXPECT_FALSE, output(), and to_number().

◆ TEST() [20/42]

TEST ( StrTest  ,
ToNumberUnsigned8BitInt   
)

Definition at line 275 of file str.test.cc.

References EXPECT_EQ, EXPECT_TRUE, output(), and to_number().

◆ TEST() [21/42]

TEST ( StrTest  ,
ToNumberUnsigned8BitIntNegative   
)

Definition at line 283 of file str.test.cc.

References EXPECT_FALSE, output(), and to_number().

◆ TEST() [22/42]

TEST ( StrTest  ,
ToNumber64BitInt   
)

Definition at line 290 of file str.test.cc.

References EXPECT_EQ, EXPECT_TRUE, output(), to_number(), and sc_dt::to_string().

◆ TEST() [23/42]

TEST ( StrTest  ,
ToNumber64BitIntInvalidString   
)

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

References EXPECT_FALSE, output(), and to_number().

◆ TEST() [24/42]

TEST ( StrTest  ,
ToNumberFloat   
)

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

References EXPECT_EQ, EXPECT_TRUE, output(), and to_number().

◆ TEST() [25/42]

TEST ( StrTest  ,
ToNumberFloatIntegerString   
)

Definition at line 315 of file str.test.cc.

References EXPECT_EQ, EXPECT_TRUE, output(), and to_number().

◆ TEST() [26/42]

TEST ( StrTest  ,
ToNumberFloatNegative   
)

Definition at line 324 of file str.test.cc.

References EXPECT_EQ, EXPECT_TRUE, output(), and to_number().

◆ TEST() [27/42]

TEST ( StrTest  ,
ToNumberDouble   
)

Definition at line 333 of file str.test.cc.

References EXPECT_EQ, EXPECT_TRUE, output(), and to_number().

◆ TEST() [28/42]

TEST ( StrTest  ,
ToNumberDoubleIntegerString   
)

Definition at line 342 of file str.test.cc.

References EXPECT_EQ, EXPECT_TRUE, output(), and to_number().

◆ TEST() [29/42]

TEST ( StrTest  ,
ToNumberDoubleNegative   
)

Definition at line 351 of file str.test.cc.

References EXPECT_EQ, EXPECT_TRUE, output(), and to_number().

◆ TEST() [30/42]

TEST ( StrTest  ,
ToBoolTrue   
)

Definition at line 365 of file str.test.cc.

References EXPECT_TRUE, output(), and to_bool().

◆ TEST() [31/42]

TEST ( StrTest  ,
ToBoolFalse   
)

Definition at line 372 of file str.test.cc.

References EXPECT_FALSE, EXPECT_TRUE, output(), and to_bool().

◆ TEST() [32/42]

TEST ( StrTest  ,
ToBoolInvalidInput   
)

Definition at line 378 of file str.test.cc.

References EXPECT_FALSE, output(), and to_bool().

◆ TEST() [33/42]

TEST ( StrTest  ,
QuoteStringNoSpace   
)

Definition at line 388 of file str.test.cc.

References EXPECT_EQ, and quote().

◆ TEST() [34/42]

TEST ( StrTest  ,
QuoteStringWithSpace   
)

Definition at line 393 of file str.test.cc.

References EXPECT_EQ, and quote().

◆ TEST() [35/42]

TEST ( StrTest  ,
QuoteQuotedString   
)

Definition at line 398 of file str.test.cc.

References EXPECT_EQ, and quote().

◆ TEST() [36/42]

TEST ( StrTest  ,
QuoteStringWithTab   
)

Definition at line 406 of file str.test.cc.

References EXPECT_EQ, and quote().

◆ TEST() [37/42]

TEST ( StrTest  ,
StartswithDoubleStringDoesStartWith   
)

Definition at line 421 of file str.test.cc.

References EXPECT_TRUE, ArmISA::s, and startswith().

◆ TEST() [38/42]

TEST ( StrTest  ,
StartswithDoubleStringDoesNotStartWith   
)

Definition at line 428 of file str.test.cc.

References EXPECT_FALSE, ArmISA::s, and startswith().

◆ TEST() [39/42]

TEST ( StrTest  ,
StartswithDoubleCharArrayDoesStartWith   
)

Definition at line 435 of file str.test.cc.

References EXPECT_TRUE, ArmISA::s, and startswith().

◆ TEST() [40/42]

TEST ( StrTest  ,
StartswithDoubleCharArrayDoesNotStartWith   
)

Definition at line 442 of file str.test.cc.

References EXPECT_FALSE, ArmISA::s, and startswith().

◆ TEST() [41/42]

TEST ( StrTest  ,
StartswithStringCharArrayDoesStartWith   
)

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

References EXPECT_TRUE, ArmISA::s, and startswith().

◆ TEST() [42/42]

TEST ( StrTest  ,
StartswithStringCharArrayDoesNotStartWith   
)

Definition at line 456 of file str.test.cc.

References EXPECT_FALSE, ArmISA::s, and startswith().


Generated on Fri Feb 28 2020 16:27:06 for gem5 by doxygen 1.8.13