#include "src/tint/lang/wgsl/reader/parser/lexer.h"
#include <limits>
#include <string>
#include <tuple>
#include <vector>
#include "gtest/gtest.h"
#include "src/tint/lang/core/fluent_types.h"
#include "src/tint/lang/core/number.h"
usingnamespacetint::core::fluent_types;
namespace tint::wgsl::reader {
namespace {
LexerTest;
#define kSpace …
#define kHTab …
#define kL2R …
#define kR2L …
#define kCR …
#define kLF …
#define kVTab …
#define kFF …
#define kNL …
#define kLS …
#define kPS …
TEST_F(LexerTest, Empty) { … }
TEST_F(LexerTest, Skips_Blankspace_Basic) { … }
TEST_F(LexerTest, Skips_Blankspace_Exotic) { … }
TEST_F(LexerTest, Skips_Comments_Line) { … }
TEST_F(LexerTest, Skips_Comments_Unicode) { … }
LineCommentTerminatorTest;
TEST_P(LineCommentTerminatorTest, Terminators) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(LexerTest, Skips_Comments_Block) { … }
TEST_F(LexerTest, Skips_Comments_Block_Nested) { … }
TEST_F(LexerTest, Skips_Comments_Block_Unterminated) { … }
TEST_F(LexerTest, Null_InBlankspace_IsError) { … }
TEST_F(LexerTest, Null_InLineComment_IsError) { … }
TEST_F(LexerTest, Null_InBlockComment_IsError) { … }
TEST_F(LexerTest, Null_InIdentifier_IsError) { … }
struct FloatData { … };
inline std::ostream& operator<<(std::ostream& out, FloatData data) { … }
FloatTest;
TEST_P(FloatTest, Parse) { … }
INSTANTIATE_TEST_SUITE_P(…);
FloatTest_Invalid;
TEST_P(FloatTest_Invalid, Handles) { … }
INSTANTIATE_TEST_SUITE_P(…);
AsciiIdentifierTest;
TEST_P(AsciiIdentifierTest, Parse) { … }
INSTANTIATE_TEST_SUITE_P(…);
struct UnicodeCase { … };
ValidUnicodeIdentifierTest;
TEST_P(ValidUnicodeIdentifierTest, Parse) { … }
INSTANTIATE_TEST_SUITE_P(…);
InvalidUnicodeIdentifierTest;
TEST_P(InvalidUnicodeIdentifierTest, Parse) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(LexerTest, IdentifierTest_SingleUnderscoreDoesNotMatch) { … }
TEST_F(LexerTest, IdentifierTest_DoesNotStartWithDoubleUnderscore) { … }
TEST_F(LexerTest, IdentifierTest_DoesNotStartWithNumber) { … }
struct ParseIntegerCase { … };
inline std::ostream& operator<<(std::ostream& out, ParseIntegerCase data) { … }
ParseIntegerTest;
TEST_P(ParseIntegerTest, Parse) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
ParseIntegerTest_CannotBeRepresented;
TEST_P(ParseIntegerTest_CannotBeRepresented, Parse) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
ParseIntegerTest_LeadingZeros;
TEST_P(ParseIntegerTest_LeadingZeros, Parse) { … }
INSTANTIATE_TEST_SUITE_P(…);
ParseIntegerTest_NoSignificantDigits;
TEST_P(ParseIntegerTest_NoSignificantDigits, Parse) { … }
INSTANTIATE_TEST_SUITE_P(…);
struct TokenData { … };
inline std::ostream& operator<<(std::ostream& out, TokenData data) { … }
PunctuationTest;
TEST_P(PunctuationTest, Parses) { … }
INSTANTIATE_TEST_SUITE_P(…);
SplittablePunctuationTest;
TEST_P(SplittablePunctuationTest, Parses) { … }
INSTANTIATE_TEST_SUITE_P(…);
KeywordTest;
TEST_P(KeywordTest, Parses) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}