v8
3.14.5(node0.10.28)
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)) |
#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 138 of file test-regexp.cc.
Referenced by TEST().
#define CHECK_PARSE_EQ | ( | input, | |
expected | |||
) | CHECK_EQ(expected, *Parse(input)) |
Definition at line 136 of file test-regexp.cc.
Referenced by TEST().
#define CHECK_PARSE_ERROR | ( | input | ) | CHECK(!CheckParse(input)) |
Definition at line 135 of file test-regexp.cc.
Referenced by TEST().
#define CHECK_SIMPLE | ( | input, | |
simple | |||
) | CHECK_EQ(simple, CheckSimple(input)); |
Definition at line 137 of file test-regexp.cc.
Referenced by TEST().
TEST | ( | Parser | ) |
Definition at line 144 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 383 of file test-regexp.cc.
References CHECK_PARSE_EQ.
TEST | ( | Errors | ) |
Definition at line 406 of file test-regexp.cc.
References StringStream::Add(), V8::Initialize(), v8::internal::NULL, and StringStream::ToCString().
TEST | ( | CharacterClassEscapes | ) |
Definition at line 494 of file test-regexp.cc.
References V8::Initialize(), v8::internal::IsRegExpNewline(), v8::internal::IsRegExpWord(), and v8::internal::NULL.
TEST | ( | SplayTreeSimple | ) |
Definition at line 573 of file test-regexp.cc.
References CHECK, CHECK_EQ, CHECK_MAPS_EQUAL, v8::internal::DELETE_ON_EXIT, SplayTree< Config, ZoneAllocationPolicy >::Find(), SplayTree< Config, ZoneAllocationPolicy >::FindGreatestLessThan(), SplayTree< Config, ZoneAllocationPolicy >::FindLeastGreaterThan(), V8::Initialize(), SplayTree< Config, ZoneAllocationPolicy >::Insert(), v8::internal::NULL, and SplayTree< Config, ZoneAllocationPolicy >::Remove().
TEST | ( | DispatchTableConstruction | ) |
Definition at line 626 of file test-regexp.cc.
References DispatchTable::AddRange(), CHECK, CHECK_EQ, v8::internal::DELETE_ON_EXIT, OutSet::Get(), DispatchTable::Get(), V8::Initialize(), v8::internal::NULL, and Vector< T >::Sort().
TEST | ( | MacroAssemblerNativeSuccess | ) |
Definition at line 746 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), V8::Initialize(), Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeSimple | ) |
Definition at line 782 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), NativeRegExpMacroAssembler::FAILURE, foo, V8::Initialize(), Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeSimpleUC16 | ) |
Definition at line 840 of file test-regexp.cc.
References Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), NativeRegExpMacroAssembler::FAILURE, foo, V8::Initialize(), Factory::NewStringFromAscii(), Factory::NewStringFromTwoByte(), NativeRegExpMacroAssembler::SUCCESS, and NativeRegExpMacroAssembler::UC16.
TEST | ( | MacroAssemblerNativeBacktrack | ) |
Definition at line 903 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), NativeRegExpMacroAssembler::FAILURE, V8::Initialize(), Factory::NewStringFromAscii(), and v8::internal::NULL.
TEST | ( | MacroAssemblerNativeBackReferenceASCII | ) |
Definition at line 942 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), V8::Initialize(), Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeBackReferenceUC16 | ) |
Definition at line 990 of file test-regexp.cc.
References Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), V8::Initialize(), Factory::NewStringFromAscii(), Factory::NewStringFromTwoByte(), NativeRegExpMacroAssembler::SUCCESS, and NativeRegExpMacroAssembler::UC16.
TEST | ( | MacroAssemblernativeAtStart | ) |
Definition at line 1041 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), V8::Initialize(), Factory::NewStringFromAscii(), v8::internal::NULL, and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeBackRefNoCase | ) |
Definition at line 1099 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), V8::Initialize(), Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerNativeRegisters | ) |
Definition at line 1157 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, v8::internal::CStrVector(), foo, V8::Initialize(), RegExpMacroAssembler::kNoStackLimitCheck, Factory::NewStringFromAscii(), v8::internal::sp, and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | MacroAssemblerStackOverflow | ) |
Definition at line 1259 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(), V8::Initialize(), Factory::NewStringFromAscii(), and v8::internal::NULL.
TEST | ( | MacroAssemblerNativeLotsOfRegisters | ) |
Definition at line 1298 of file test-regexp.cc.
References NativeRegExpMacroAssembler::ASCII, Handle< T >::cast(), CHECK_EQ, Isolate::clear_pending_exception(), v8::internal::CStrVector(), Isolate::factory(), V8::Initialize(), RegExpMacroAssembler::kNoStackLimitCheck, Factory::NewStringFromAscii(), and NativeRegExpMacroAssembler::SUCCESS.
TEST | ( | AddInverseToTable | ) |
Definition at line 1418 of file test-regexp.cc.
References List< T, ZoneAllocationPolicy >::Add(), DispatchTableConstructor::AddInverse(), List< T, ZoneAllocationPolicy >::at(), CHECK, CHECK_EQ, CharacterRange::Contains(), v8::internal::DELETE_ON_EXIT, OutSet::Get(), DispatchTable::Get(), V8::Initialize(), v8::internal::NULL, and DispatchTableConstructor::set_choice_index().
TEST | ( | LatinCanonicalize | ) |
Definition at line 1474 of file test-regexp.cc.
References CHECK_EQ, CHECK_GE, Mapping< T, size >::get(), ToUppercase::kMaxWidth, and Ecma262UnCanonicalize::kMaxWidth.
TEST | ( | RangeCanonicalization | ) |
Definition at line 1516 of file test-regexp.cc.
References CHECK_EQ, Mapping< T, size >::get(), and Ecma262UnCanonicalize::kMaxWidth.
TEST | ( | UncanonicalizeEquivalence | ) |
Definition at line 1544 of file test-regexp.cc.
References CHECK_EQ, Mapping< T, size >::get(), and Ecma262UnCanonicalize::kMaxWidth.
TEST | ( | CharacterRangeCaseIndependence | ) |
Definition at line 1584 of file test-regexp.cc.
References V8::Initialize(), v8::internal::NULL, and CharacterRange::Singleton().
TEST | ( | CharClassDifference | ) |
Definition at line 1626 of file test-regexp.cc.
References List< T, ZoneAllocationPolicy >::Add(), CHECK, CHECK_EQ, v8::internal::DELETE_ON_EXIT, CharacterRange::Everything(), CharacterRange::GetWordBounds(), V8::Initialize(), Vector< T >::length(), v8::internal::NULL, and CharacterRange::Split().
TEST | ( | CanonicalizeCharacterSets | ) |
Definition at line 1656 of file test-regexp.cc.
References List< T, ZoneAllocationPolicy >::Add(), ASSERT_EQ, List< T, ZoneAllocationPolicy >::at(), v8::internal::DELETE_ON_EXIT, CharacterRange::from(), V8::Initialize(), v8::internal::NULL, and CharacterRange::to().
TEST | ( | CharacterRangeMerge | ) |
Definition at line 1719 of file test-regexp.cc.
References List< T, ZoneAllocationPolicy >::Add(), ASSERT, v8::internal::DELETE_ON_EXIT, V8::Initialize(), CharacterRange::IsCanonical(), v8::internal::NULL, CharacterRange::Range(), and CharacterRange::Singleton().
TEST | ( | Graph | ) |
Definition at line 1808 of file test-regexp.cc.
References V8::Initialize(), and v8::internal::NULL.