v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "v8.h"
#include "cctest.h"
#include "compiler.h"
#include "execution.h"
#include "isolate.h"
#include "objects.h"
#include "parser.h"
#include "preparser.h"
#include "scanner-character-streams.h"
#include "token.h"
#include "utils.h"
Go to the source code of this file.
Data Structures | |
class | ScriptResource |
struct | CompleteParserRecorderFriend |
class | TestExternalResource |
Namespaces | |
v8 | |
v8::internal | |
Macros | |
#define | KEYWORD(t, s, d) { s, i::Token::t }, |
#define | CHECK_EQU(v1, v2) CHECK_EQ(static_cast<int>(v1), static_cast<int>(v2)) |
Enumerations | |
enum | ParserFlag { kAllowLazy, kAllowNativesSyntax, kAllowHarmonyScoping, kAllowModules, kAllowGenerators, kAllowForOf, kAllowHarmonyNumericLiterals } |
enum | ParserSyncTestResult { kSuccessOrError, kSuccess, kError } |
Functions | |
TEST (ScanKeywords) | |
TEST (ScanHTMLEndComments) | |
TEST (Preparsing) | |
TEST (PreparseFunctionDataIsUsed) | |
TEST (PreparseSymbolDataIsUsed) | |
TEST (StandAlonePreParser) | |
TEST (StandAlonePreParserNoNatives) | |
TEST (PreparsingObjectLiterals) | |
TEST (StoringNumbersInPreParseData) | |
TEST (RegressChromium62639) | |
TEST (Regress928) | |
TEST (PreParseOverflow) | |
void | TestCharacterStream (const char *ascii_source, unsigned length, unsigned start=0, unsigned end=0) |
TEST (CharacterStreams) | |
TEST (Utf8CharacterStream) | |
void | TestStreamScanner (i::Utf16CharacterStream *stream, i::Token::Value *expected_tokens, int skip_pos=0, int skip_to=0) |
TEST (StreamScanner) | |
void | TestScanRegExp (const char *re_source, const char *expected) |
TEST (RegExpScanning) | |
TEST (ScopePositions) | |
i::Handle< i::String > | FormatMessage (i::ScriptDataImpl *data) |
template<typename Traits > | |
void | SetParserFlags (i::ParserBase< Traits > *parser, i::EnumSet< ParserFlag > flags) |
void | TestParserSyncWithFlags (i::Handle< i::String > source, i::EnumSet< ParserFlag > flags, ParserSyncTestResult result) |
void | TestParserSync (const char *source, const ParserFlag *flag_list, size_t flag_list_length, ParserSyncTestResult result=kSuccessOrError) |
TEST (ParserSync) | |
TEST (PreparserStrictOctal) | |
void | RunParserSyncTest (const char *context_data[][2], const char *statement_data[], ParserSyncTestResult result, const ParserFlag *flags=NULL, int flags_len=0) |
TEST (ErrorsEvalAndArguments) | |
TEST (NoErrorsEvalAndArgumentsSloppy) | |
TEST (NoErrorsEvalAndArgumentsStrict) | |
TEST (ErrorsFutureStrictReservedWords) | |
TEST (NoErrorsFutureStrictReservedWords) | |
TEST (ErrorsReservedWords) | |
TEST (NoErrorsYieldSloppy) | |
TEST (ErrorsYieldSloppyGenerator) | |
TEST (ErrorsYieldStrict) | |
TEST (ErrorsYield) | |
TEST (ErrorsNameOfStrictFunction) | |
TEST (NoErrorsNameOfStrictFunction) | |
TEST (ErrorsIllegalWordsAsLabelsSloppy) | |
TEST (ErrorsIllegalWordsAsLabelsStrict) | |
TEST (NoErrorsIllegalWordsAsLabels) | |
TEST (ErrorsParenthesizedLabels) | |
TEST (NoErrorsParenthesizedDirectivePrologue) | |
TEST (ErrorsNotAnIdentifierName) | |
TEST (NoErrorsIdentifierNames) | |
TEST (DontRegressPreParserDataSizes) | |
TEST (FunctionDeclaresItselfStrict) | |
TEST (ErrorsTryWithoutCatchOrFinally) | |
TEST (NoErrorsTryCatchFinally) | |
TEST (ErrorsRegexpLiteral) | |
TEST (NoErrorsRegexpLiteral) | |
TEST (Intrinsics) | |
TEST (NoErrorsNewExpression) | |
TEST (ErrorsNewExpression) | |
TEST (StrictObjectLiteralChecking) | |
TEST (ErrorsObjectLiteralChecking) | |
TEST (NoErrorsObjectLiteralChecking) | |
TEST (TooManyArguments) | |
TEST (StrictDelete) | |
TEST (InvalidLeftHandSide) | |
#define CHECK_EQU | ( | v1, | |
v2 | |||
) | CHECK_EQ(static_cast<int>(v1), static_cast<int>(v2)) |
Definition at line 638 of file test-parsing.cc.
Referenced by TEST(), and TestCharacterStream().
#define KEYWORD | ( | t, | |
s, | |||
d | |||
) | { s, i::Token::t }, |
Referenced by TEST().
enum ParserFlag |
Enumerator | |
---|---|
kAllowLazy | |
kAllowNativesSyntax | |
kAllowHarmonyScoping | |
kAllowModules | |
kAllowGenerators | |
kAllowForOf | |
kAllowHarmonyNumericLiterals |
Definition at line 1295 of file test-parsing.cc.
enum ParserSyncTestResult |
Enumerator | |
---|---|
kSuccessOrError | |
kSuccess | |
kError |
Definition at line 1306 of file test-parsing.cc.
i::Handle<i::String> FormatMessage | ( | i::ScriptDataImpl * | data | ) |
Definition at line 1263 of file test-parsing.cc.
References ScriptDataImpl::BuildArgs(), ScriptDataImpl::BuildMessage(), Execution::Call(), Handle< T >::cast(), CHECK, v8::internal::DeleteArray(), Isolate::factory(), v8::internal::GetProperty(), CcTest::i_isolate(), CcTest::isolate(), Isolate::js_builtins_object(), Vector< T >::length(), message, String::NewFromUtf8(), Factory::NewJSArray(), NONE, Utils::OpenHandle(), JSObject::SetElement(), v8::internal::SLOPPY, and Vector< T >::start().
Referenced by TestParserSyncWithFlags().
void RunParserSyncTest | ( | const char * | context_data[][2], |
const char * | statement_data[], | ||
ParserSyncTestResult | result, | ||
const ParserFlag * | flags = NULL , |
||
int | flags_len = 0 |
||
) |
Definition at line 1582 of file test-parsing.cc.
References ARRAY_SIZE, CHECK, flags, CcTest::i_isolate(), CcTest::isolate(), kAllowForOf, kAllowGenerators, kAllowHarmonyScoping, kAllowLazy, kAllowModules, kAllowNativesSyntax, Context::New(), NULL, StackGuard::SetStackLimit(), OS::SNPrintF(), Isolate::stack_guard(), Vector< T >::start(), v8::internal::StrLength(), and TestParserSync().
Referenced by TEST().
void SetParserFlags | ( | i::ParserBase< Traits > * | parser, |
i::EnumSet< ParserFlag > | flags | ||
) |
Definition at line 1313 of file test-parsing.cc.
References EnumSet< E, T >::Contains(), kAllowForOf, kAllowGenerators, kAllowHarmonyNumericLiterals, kAllowHarmonyScoping, kAllowLazy, kAllowModules, kAllowNativesSyntax, ParserBase< Traits >::set_allow_for_of(), ParserBase< Traits >::set_allow_generators(), ParserBase< Traits >::set_allow_harmony_numeric_literals(), ParserBase< Traits >::set_allow_harmony_scoping(), ParserBase< Traits >::set_allow_lazy(), ParserBase< Traits >::set_allow_modules(), and ParserBase< Traits >::set_allow_natives_syntax().
Referenced by TestParserSyncWithFlags().
TEST | ( | ScanKeywords | ) |
Definition at line 45 of file test-parsing.cc.
References ARRAY_SIZE, CHECK, CHECK_EQ, IGNORE_TOKEN, Scanner::Initialize(), KEYWORD, OS::MemMove(), Scanner::Next(), NULL, Scanner::SetHarmonyModules(), Scanner::SetHarmonyScoping(), v8::internal::StrLength(), and TOKEN_LIST.
TEST | ( | ScanHTMLEndComments | ) |
Definition at line 109 of file test-parsing.cc.
References CHECK, ScriptData::HasError(), CcTest::i_isolate(), V8::Initialize(), CcTest::isolate(), String::kNormalString, String::NewFromUtf8(), NULL, ScriptData::PreCompile(), StackGuard::SetStackLimit(), Isolate::stack_guard(), and v8::internal::StrLength().
TEST | ( | Preparsing | ) |
Definition at line 183 of file test-parsing.cc.
References CHECK, CHECK_EQ, CHECK_GT, ScriptCompiler::Compile(), ScriptCompiler::CompileUnbound(), ScriptData::Data(), v8::internal::DeleteArray(), Vector< T >::Dispose(), ScriptData::HasError(), CcTest::i_isolate(), CcTest::isolate(), String::kNormalString, ScriptData::Length(), message, ScriptDataImpl::MessageLocation(), Context::New(), String::NewExternal(), String::NewFromUtf8(), ScriptData::PreCompile(), StackGuard::SetStackLimit(), Isolate::stack_guard(), and v8::internal::StrLength().
TEST | ( | PreparseFunctionDataIsUsed | ) |
Definition at line 263 of file test-parsing.cc.
References CHECK, CHECK_EQ, CHECK_GT, ScriptCompiler::Compile(), ScriptCompiler::CachedData::data, ScriptCompiler::Source::GetCachedData(), CcTest::i_isolate(), CcTest::isolate(), ScriptCompiler::kProduceDataToCache, ScriptCompiler::CachedData::length, Context::New(), NULL, StackGuard::SetStackLimit(), and Isolate::stack_guard().
TEST | ( | PreparseSymbolDataIsUsed | ) |
Definition at line 306 of file test-parsing.cc.
References CHECK, CHECK_EQ, CHECK_GT, ScriptCompiler::Compile(), ScriptCompiler::CachedData::data, ScriptCompiler::Source::GetCachedData(), CcTest::i_isolate(), CcTest::isolate(), ScriptCompiler::kProduceDataToCache, ScriptCompiler::CachedData::length, Context::New(), NULL, StackGuard::SetStackLimit(), and Isolate::stack_guard().
TEST | ( | StandAlonePreParser | ) |
Definition at line 356 of file test-parsing.cc.
References CHECK, CHECK_EQ, CompleteParserRecorder::ExtractData(), CcTest::i_isolate(), Scanner::Initialize(), V8::Initialize(), PreParser::kPreParseSuccess, log, NULL, PreParser::PreParseProgram(), StackGuard::real_climit(), ParserBase< Traits >::set_allow_lazy(), ParserBase< Traits >::set_allow_natives_syntax(), StackGuard::SetStackLimit(), and Isolate::stack_guard().
TEST | ( | StandAlonePreParserNoNatives | ) |
Definition at line 393 of file test-parsing.cc.
References CHECK, CHECK_EQ, CompleteParserRecorder::ExtractData(), CcTest::i_isolate(), Scanner::Initialize(), V8::Initialize(), PreParser::kPreParseSuccess, log, NULL, PreParser::PreParseProgram(), StackGuard::real_climit(), ParserBase< Traits >::set_allow_lazy(), StackGuard::SetStackLimit(), and Isolate::stack_guard().
TEST | ( | PreparsingObjectLiterals | ) |
Definition at line 428 of file test-parsing.cc.
References CHECK, CHECK_EQ, CcTest::i_isolate(), CcTest::isolate(), Context::New(), StackGuard::SetStackLimit(), and Isolate::stack_guard().
TEST | ( | StoringNumbersInPreParseData | ) |
Definition at line 490 of file test-parsing.cc.
References CHECK_EQ, CompleteParserRecorder::ExtractData(), F, ScriptDataImpl::GetSymbolIdentifier(), ScriptDataImpl::Initialize(), and log.
TEST | ( | RegressChromium62639 | ) |
Definition at line 521 of file test-parsing.cc.
References CHECK, ScriptDataImpl::HasError(), CcTest::i_isolate(), V8::Initialize(), PreParserApi::PreParse(), StackGuard::SetStackLimit(), and Isolate::stack_guard().
TEST | ( | Regress928 | ) |
Definition at line 545 of file test-parsing.cc.
References CHECK, CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), CcTest::i_isolate(), V8::Initialize(), CcTest::isolate(), Factory::NewStringFromAscii(), PreParserApi::PreParse(), StackGuard::SetStackLimit(), Isolate::stack_guard(), and v8::internal::StrLength().
TEST | ( | PreParseOverflow | ) |
Definition at line 590 of file test-parsing.cc.
References CHECK_EQ, SmartPointerBase< Deallocator, T >::get(), CcTest::i_isolate(), Scanner::Initialize(), V8::Initialize(), PreParser::kPreParseStackOverflow, log, PreParser::PreParseProgram(), StackGuard::real_climit(), ParserBase< Traits >::set_allow_lazy(), StackGuard::SetStackLimit(), and Isolate::stack_guard().
TEST | ( | CharacterStreams | ) |
Definition at line 752 of file test-parsing.cc.
References CcTest::isolate(), Context::New(), and TestCharacterStream().
TEST | ( | Utf8CharacterStream | ) |
Definition at line 773 of file test-parsing.cc.
References Utf16CharacterStream::Advance(), ASSERT, CHECK_EQ, CHECK_EQU, Utf8::Encode(), Utf8::kMaxOneByteChar, Utf8::kMaxThreeByteChar, Utf8::kMaxTwoByteChar, Utf16::kNoPreviousCharacter, Utf16CharacterStream::pos(), BufferedUtf16CharacterStream::PushBack(), and Utf16CharacterStream::SeekForward().
TEST | ( | StreamScanner | ) |
Definition at line 844 of file test-parsing.cc.
References ASSERT_EQ, CASE, v8::internal::CONST, v8::DEFAULT, v8::internal::DIV, V8::Initialize(), v8::internal::MUL, v8::internal::SUB, and TestStreamScanner().
TEST | ( | RegExpScanning | ) |
Definition at line 931 of file test-parsing.cc.
References V8::Initialize(), and TestScanRegExp().
TEST | ( | ScopePositions | ) |
Definition at line 1029 of file test-parsing.cc.
References v8::internal::BLOCK_SCOPE, v8::internal::CATCH_SCOPE, CHECK, CHECK_EQ, v8::internal::CStrVector(), v8::internal::EVAL_SCOPE, Isolate::factory(), CompilationInfo::function(), v8::internal::FUNCTION_SCOPE, CcTest::i_isolate(), info, Scope::inner_scopes(), CcTest::isolate(), CompilationInfo::MarkAsGlobal(), Context::New(), Factory::NewScript(), Factory::NewStringFromUtf8(), NULL, Parser::Parse(), ParserBase< Traits >::set_allow_harmony_scoping(), ParserBase< Traits >::set_allow_lazy(), StackGuard::SetStackLimit(), CompilationInfo::SetStrictMode(), v8::internal::SLOPPY, OS::SNPrintF(), Isolate::stack_guard(), Vector< T >::start(), v8::internal::STRICT, v8::internal::StrLength(), and v8::internal::WITH_SCOPE.
TEST | ( | ParserSync | ) |
Definition at line 1441 of file test-parsing.cc.
References ARRAY_SIZE, CHECK, CcTest::i_isolate(), CcTest::isolate(), kAllowForOf, kAllowGenerators, kAllowHarmonyNumericLiterals, kAllowHarmonyScoping, kAllowLazy, kAllowModules, kAllowNativesSyntax, Context::New(), NULL, StackGuard::SetStackLimit(), OS::SNPrintF(), Isolate::stack_guard(), Vector< T >::start(), v8::internal::StrLength(), and TestParserSync().
TEST | ( | PreparserStrictOctal | ) |
Definition at line 1558 of file test-parsing.cc.
References CHECK, CHECK_EQ, Script::Compile(), TryCatch::Exception(), TryCatch::HasCaught(), V8::Initialize(), CcTest::isolate(), Context::New(), and String::NewFromUtf8().
TEST | ( | ErrorsEvalAndArguments | ) |
Definition at line 1627 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsEvalAndArgumentsSloppy | ) |
Definition at line 1666 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsEvalAndArgumentsStrict | ) |
Definition at line 1703 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsFutureStrictReservedWords | ) |
Definition at line 1726 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsFutureStrictReservedWords | ) |
Definition at line 1755 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsReservedWords | ) |
Definition at line 1780 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsYieldSloppy | ) |
Definition at line 1811 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsYieldSloppyGenerator | ) |
Definition at line 1838 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | ErrorsYieldStrict | ) |
Definition at line 1866 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | ErrorsYield | ) |
Definition at line 1892 of file test-parsing.cc.
References kSuccessOrError, NULL, and RunParserSyncTest().
TEST | ( | ErrorsNameOfStrictFunction | ) |
Definition at line 1911 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsNameOfStrictFunction | ) |
Definition at line 1935 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsIllegalWordsAsLabelsSloppy | ) |
Definition at line 1954 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | ErrorsIllegalWordsAsLabelsStrict | ) |
Definition at line 1971 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsIllegalWordsAsLabels | ) |
Definition at line 1990 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsParenthesizedLabels | ) |
Definition at line 2011 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsParenthesizedDirectivePrologue | ) |
Definition at line 2028 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsNotAnIdentifierName | ) |
Definition at line 2044 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsIdentifierNames | ) |
Definition at line 2065 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | DontRegressPreParserDataSizes | ) |
Definition at line 2087 of file test-parsing.cc.
References CHECK, CHECK_EQ, CompleteParserRecorder::ExtractData(), F, CcTest::i_isolate(), Scanner::Initialize(), V8::Initialize(), PreParser::kPreParseSuccess, log, NULL, PreParser::PreParseProgram(), OS::Print(), StackGuard::real_climit(), ParserBase< Traits >::set_allow_lazy(), ParserBase< Traits >::set_allow_natives_syntax(), StackGuard::SetStackLimit(), Isolate::stack_guard(), and symbols().
TEST | ( | FunctionDeclaresItselfStrict | ) |
Definition at line 2163 of file test-parsing.cc.
References kError, kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsTryWithoutCatchOrFinally | ) |
Definition at line 2200 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsTryCatchFinally | ) |
Definition at line 2219 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsRegexpLiteral | ) |
Definition at line 2236 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsRegexpLiteral | ) |
Definition at line 2251 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | Intrinsics | ) |
Definition at line 2268 of file test-parsing.cc.
References kSuccessOrError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsNewExpression | ) |
Definition at line 2285 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsNewExpression | ) |
Definition at line 2324 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | StrictObjectLiteralChecking | ) |
Definition at line 2343 of file test-parsing.cc.
References kError, kSuccess, NULL, and RunParserSyncTest().
TEST | ( | ErrorsObjectLiteralChecking | ) |
Definition at line 2370 of file test-parsing.cc.
References kError, NULL, and RunParserSyncTest().
TEST | ( | NoErrorsObjectLiteralChecking | ) |
Definition at line 2405 of file test-parsing.cc.
References kSuccess, NULL, and RunParserSyncTest().
TEST | ( | TooManyArguments | ) |
Definition at line 2451 of file test-parsing.cc.
References kAllowLazy, kError, NULL, and RunParserSyncTest().
TEST | ( | StrictDelete | ) |
Definition at line 2476 of file test-parsing.cc.
References kError, kSuccess, NULL, and RunParserSyncTest().
TEST | ( | InvalidLeftHandSide | ) |
Definition at line 2530 of file test-parsing.cc.
References kError, kSuccess, NULL, and RunParserSyncTest().
void TestCharacterStream | ( | const char * | ascii_source, |
unsigned | length, | ||
unsigned | start = 0 , |
||
unsigned | end = 0 |
||
) |
Definition at line 640 of file test-parsing.cc.
References Utf16CharacterStream::Advance(), CHECK_EQ, CHECK_EQU, CHECK_LT, Isolate::factory(), SmartPointerBase< ArrayDeallocator< T >, T >::get(), CcTest::i_isolate(), Factory::NewExternalStringFromTwoByte(), Factory::NewStringFromAscii(), Utf16CharacterStream::pos(), BufferedUtf16CharacterStream::PushBack(), and Utf16CharacterStream::SeekForward().
Referenced by TEST().
void TestParserSync | ( | const char * | source, |
const ParserFlag * | flag_list, | ||
size_t | flag_list_length, | ||
ParserSyncTestResult | result = kSuccessOrError |
||
) |
Definition at line 1425 of file test-parsing.cc.
References EnumSet< E, T >::Add(), v8::internal::CStrVector(), Isolate::factory(), flags, CcTest::i_isolate(), Factory::NewStringFromAscii(), and TestParserSyncWithFlags().
Referenced by RunParserSyncTest(), and TEST().
void TestParserSyncWithFlags | ( | i::Handle< i::String > | source, |
i::EnumSet< ParserFlag > | flags, | ||
ParserSyncTestResult | result | ||
) |
Definition at line 1326 of file test-parsing.cc.
References Handle< T >::cast(), CHECK, CHECK_EQ, CompleteParserRecorder::ExtractData(), Isolate::factory(), FormatMessage(), CompilationInfo::function(), v8::internal::GetProperty(), Isolate::has_pending_exception(), CcTest::i_isolate(), info, kError, PreParser::kPreParseSuccess, kSuccess, log, CompilationInfo::MarkAsGlobal(), Factory::NewScript(), NULL, Parser::Parse(), Isolate::pending_exception(), OS::Print(), StackGuard::real_climit(), SetParserFlags(), Isolate::stack_guard(), and Isolate::unicode_cache().
Referenced by TestParserSync().
void TestScanRegExp | ( | const char * | re_source, |
const char * | expected | ||
) |
Definition at line 906 of file test-parsing.cc.
References Scanner::AllocateInternalizedString(), CHECK, CHECK_EQ, CHECK_NE, v8::internal::DIV, CcTest::i_isolate(), Scanner::Initialize(), Scanner::Next(), Scanner::peek(), and Scanner::ScanRegExpPattern().
Referenced by TEST().
void TestStreamScanner | ( | i::Utf16CharacterStream * | stream, |
i::Token::Value * | expected_tokens, | ||
int | skip_pos = 0 , |
||
int | skip_to = 0 |
||
) |
Definition at line 824 of file test-parsing.cc.
References CHECK_EQ, Scanner::Location::end_pos, CcTest::i_isolate(), Scanner::Initialize(), Scanner::location(), Scanner::Next(), Scanner::SeekForward(), and Token::String().
Referenced by TEST().