v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <stdlib.h>
#include "v8.h"
#include "ast.h"
#include "char-predicates-inl.h"
#include "cctest.h"
#include "jsregexp.h"
#include "parser.h"
#include "regexp-macro-assembler.h"
#include "regexp-macro-assembler-irregexp.h"
#include "string-stream.h"
#include "zone-inl.h"
#include "macro-assembler.h"
#include "code.h"
Go to the source code of this file.
Data Structures | |
struct | MinMaxPair |
class | TestConfig |
class | ContextInitializer |
Macros | |
#define | CHECK_PARSE_ERROR(input) CHECK(!CheckParse(input)) |
#define | CHECK_PARSE_EQ(input, expected) CHECK_EQ(expected, Parse(input).get()) |
#define | CHECK_SIMPLE(input, simple) CHECK_EQ(simple, CheckSimple(input)); |
#define | CHECK_MIN_MAX(input, min, max) |
#define | CHECK_MAPS_EQUAL() |
Functions | |
TEST (Parser) | |
TEST (ParserRegression) | |
TEST (Errors) | |
TEST (CharacterClassEscapes) | |
TEST (SplayTreeSimple) | |
TEST (DispatchTableConstruction) | |
TEST (MacroAssemblerNativeSuccess) | |
TEST (MacroAssemblerNativeSimple) | |
TEST (MacroAssemblerNativeSimpleUC16) | |
TEST (MacroAssemblerNativeBacktrack) | |
TEST (MacroAssemblerNativeBackReferenceASCII) | |
TEST (MacroAssemblerNativeBackReferenceUC16) | |
TEST (MacroAssemblernativeAtStart) | |
TEST (MacroAssemblerNativeBackRefNoCase) | |
TEST (MacroAssemblerNativeRegisters) | |
TEST (MacroAssemblerStackOverflow) | |
TEST (MacroAssemblerNativeLotsOfRegisters) | |
TEST (AddInverseToTable) | |
TEST (LatinCanonicalize) | |
TEST (RangeCanonicalization) | |
TEST (UncanonicalizeEquivalence) | |
TEST (CharacterRangeCaseIndependence) | |
TEST (CharClassDifference) | |
TEST (CanonicalizeCharacterSets) | |
TEST (CharacterRangeMerge) | |
TEST (Graph) | |
#define CHECK_MAPS_EQUAL | ( | ) |
#define CHECK_MIN_MAX | ( | input, | |
min, | |||
max | |||
) |
Definition at line 142 of file test-regexp.cc.
Referenced by TEST().
#define CHECK_PARSE_EQ | ( | input, | |
expected | |||
) | CHECK_EQ(expected, Parse(input).get()) |
Definition at line 140 of file test-regexp.cc.
Referenced by TEST().
#define CHECK_PARSE_ERROR | ( | input | ) | CHECK(!CheckParse(input)) |
Definition at line 139 of file test-regexp.cc.
Referenced by TEST().
#define CHECK_SIMPLE | ( | input, | |
simple | |||
) | CHECK_EQ(simple, CheckSimple(input)); |
Definition at line 141 of file test-regexp.cc.
Referenced by TEST().
TEST | ( | Parser | ) |
Definition at line 148 of file test-regexp.cc.
References CHECK_MIN_MAX, CHECK_PARSE_EQ, CHECK_PARSE_ERROR, CHECK_SIMPLE, V8::Initialize(), RegExpTree::kInfinity, and v8::internal::NULL.
TEST | ( | ParserRegression | ) |
Definition at line 388 of file test-regexp.cc.
References CHECK_PARSE_EQ.
TEST | ( | Errors | ) |
Definition at line 411 of file test-regexp.cc.
References StringStream::Add(), and StringStream::ToCString().
TEST | ( | CharacterClassEscapes | ) |
Definition at line 485 of file test-regexp.cc.
References V8::Initialize(), v8::internal::IsRegExpNewline(), v8::internal::IsRegExpWord(), and v8::internal::NULL.
TEST | ( | SplayTreeSimple | ) |
Definition at line 565 of file test-regexp.cc.
References CHECK, CHECK_EQ, CHECK_MAPS_EQUAL, SplayTree< Config, ZoneAllocationPolicy >::Find(), SplayTree< Config, ZoneAllocationPolicy >::FindGreatestLessThan(), SplayTree< Config, ZoneAllocationPolicy >::FindLeastGreaterThan(), CcTest::i_isolate(), V8::Initialize(), SplayTree< Config, ZoneAllocationPolicy >::Insert(), v8::internal::NULL, and SplayTree< Config, ZoneAllocationPolicy >::Remove().
TEST | ( | DispatchTableConstruction | ) |
Definition at line 618 of file test-regexp.cc.
References DispatchTable::AddRange(), CHECK, CHECK_EQ, OutSet::Get(), DispatchTable::Get(), CcTest::i_isolate(), V8::Initialize(), v8::internal::NULL, and Vector< T >::Sort().
TEST | ( | MacroAssemblerNativeSuccess | ) |
Definition at line 737 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeSimple | ) |
Definition at line 774 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), NativeRegExpMacroAssembler::FAILURE, CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), v8::internal::NULL, and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeSimpleUC16 | ) |
Definition at line 840 of file test-regexp.cc.
References Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), NativeRegExpMacroAssembler::FAILURE, CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), Factory::NewStringFromTwoByte(), v8::internal::NULL, NativeRegExpMacroAssembler::SUCCESS, and NativeRegExpMacroAssembler::UC16.
TEST | ( | MacroAssemblerNativeBacktrack | ) |
Definition at line 911 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), NativeRegExpMacroAssembler::FAILURE, CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), and v8::internal::NULL.
TEST | ( | MacroAssemblerNativeBackReferenceASCII | ) |
Definition at line 951 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeBackReferenceUC16 | ) |
Definition at line 1000 of file test-regexp.cc.
References Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), Factory::NewStringFromTwoByte(), NativeRegExpMacroAssembler::SUCCESS, and NativeRegExpMacroAssembler::UC16.
TEST | ( | MacroAssemblernativeAtStart | ) |
Definition at line 1052 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), v8::internal::NULL, and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeBackRefNoCase | ) |
Definition at line 1111 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeRegisters | ) |
Definition at line 1170 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), Isolate::factory(), foo, CcTest::i_isolate(), V8::Initialize(), RegExpMacroAssembler::kNoStackLimitCheck, Factory::NewStringFromAscii(), v8::internal::sp, and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerStackOverflow | ) |
Definition at line 1273 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK, CHECK_EQ, Isolate::clear_pending_exception(), v8::internal::CStrVector(), NativeRegExpMacroAssembler::EXCEPTION, Isolate::factory(), Isolate::has_pending_exception(), CcTest::i_isolate(), V8::Initialize(), Factory::NewStringFromAscii(), and v8::internal::NULL.
TEST | ( | MacroAssemblerNativeLotsOfRegisters | ) |
Definition at line 1312 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, Isolate::clear_pending_exception(), v8::internal::CStrVector(), Isolate::factory(), CcTest::i_isolate(), V8::Initialize(), RegExpMacroAssembler::kNoStackLimitCheck, Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | AddInverseToTable | ) |
Definition at line 1429 of file test-regexp.cc.
References List< T, ZoneAllocationPolicy >::Add(), DispatchTableConstructor::AddInverse(), List< T, ZoneAllocationPolicy >::at(), CHECK, CHECK_EQ, CharacterRange::Contains(), OutSet::Get(), DispatchTable::Get(), CcTest::i_isolate(), V8::Initialize(), v8::internal::NULL, and DispatchTableConstructor::set_choice_index().
TEST | ( | LatinCanonicalize | ) |
Definition at line 1480 of file test-regexp.cc.
References CHECK_EQ, CHECK_GE, Mapping< T, size >::get(), ToUppercase::kMaxWidth, and Ecma262UnCanonicalize::kMaxWidth.
TEST | ( | RangeCanonicalization | ) |
Definition at line 1522 of file test-regexp.cc.
References CHECK_EQ, Mapping< T, size >::get(), and Ecma262UnCanonicalize::kMaxWidth.
TEST | ( | UncanonicalizeEquivalence | ) |
Definition at line 1550 of file test-regexp.cc.
References CHECK_EQ, Mapping< T, size >::get(), and Ecma262UnCanonicalize::kMaxWidth.
TEST | ( | CharacterRangeCaseIndependence | ) |
Definition at line 1589 of file test-regexp.cc.
References V8::Initialize(), v8::internal::NULL, and CharacterRange::Singleton().
TEST | ( | CharClassDifference | ) |
Definition at line 1631 of file test-regexp.cc.
References List< T, ZoneAllocationPolicy >::Add(), CHECK, CHECK_EQ, CharacterRange::Everything(), CharacterRange::GetWordBounds(), CcTest::i_isolate(), V8::Initialize(), Vector< T >::length(), v8::internal::NULL, and CharacterRange::Split().
TEST | ( | CanonicalizeCharacterSets | ) |
Definition at line 1659 of file test-regexp.cc.
References List< T, ZoneAllocationPolicy >::Add(), ASSERT_EQ, List< T, ZoneAllocationPolicy >::at(), CharacterRange::from(), CcTest::i_isolate(), V8::Initialize(), v8::internal::NULL, and CharacterRange::to().
TEST | ( | CharacterRangeMerge | ) |
Definition at line 1721 of file test-regexp.cc.
References List< T, ZoneAllocationPolicy >::Add(), ASSERT, CcTest::i_isolate(), V8::Initialize(), CharacterRange::IsCanonical(), v8::internal::NULL, CharacterRange::Range(), and CharacterRange::Singleton().
TEST | ( | Graph | ) |
Definition at line 1809 of file test-regexp.cc.
References V8::Initialize(), and v8::internal::NULL.