v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test-unique.cc File Reference
#include <stdlib.h>
#include "v8.h"
#include "factory.h"
#include "global-handles.h"
#include "unique.h"
#include "cctest.h"
Include dependency graph for test-unique.cc:

Go to the source code of this file.

Macros

#define MAKE_HANDLES_AND_DISALLOW_ALLOCATION
 
#define MAKE_UNIQUES_A_B_C
 
#define MAKE_UNIQUES_A_B_C_D_E_F_G
 

Functions

template<class T , class U >
void CheckHashCodeEqual (Unique< T > a, Unique< U > b)
 
template<class T , class U >
void CheckHashCodeNotEqual (Unique< T > a, Unique< U > b)
 
 TEST (UniqueCreate)
 
 TEST (UniqueSubsume)
 
 TEST (UniqueSet_Add)
 
 TEST (UniqueSet_Remove)
 
 TEST (UniqueSet_Contains)
 
 TEST (UniqueSet_At)
 
 TEST (UniqueSet_Equals)
 
 TEST (UniqueSet_IsSubset1)
 
 TEST (UniqueSet_IsSubset2)
 
 TEST (UniqueSet_IsSubsetExhaustive)
 
 TEST (UniqueSet_Intersect1)
 
 TEST (UniqueSet_IntersectExhaustive)
 
 TEST (UniqueSet_Union1)
 
 TEST (UniqueSet_UnionExhaustive)
 

Macro Definition Documentation

#define MAKE_HANDLES_AND_DISALLOW_ALLOCATION
Value:
Isolate* isolate = CcTest::i_isolate(); \
Factory* factory = isolate->factory(); \
HandleScope sc(isolate); \
Handle<String> handles[] = { \
factory->InternalizeUtf8String("A"), \
factory->InternalizeUtf8String("B"), \
factory->InternalizeUtf8String("C"), \
factory->InternalizeUtf8String("D"), \
factory->InternalizeUtf8String("E"), \
factory->InternalizeUtf8String("F"), \
factory->InternalizeUtf8String("G") \
}; \
Factory * factory()
Definition: isolate.h:995
static i::Isolate * i_isolate()
Definition: cctest.h:102
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, false > DisallowHeapAllocation
Definition: assert-scope.h:214

Definition at line 39 of file test-unique.cc.

Referenced by TEST().

#define MAKE_UNIQUES_A_B_C
Value:
Unique<String> A(handles[0]); \
Unique<String> B(handles[1]); \
Unique<String> C(handles[2])

Definition at line 54 of file test-unique.cc.

Referenced by TEST().

#define MAKE_UNIQUES_A_B_C_D_E_F_G
Value:
Unique<String> A(handles[0]); \
Unique<String> B(handles[1]); \
Unique<String> C(handles[2]); \
Unique<String> D(handles[3]); \
Unique<String> E(handles[4]); \
Unique<String> F(handles[5]); \
Unique<String> G(handles[6])
#define F(size, func)

Definition at line 59 of file test-unique.cc.

Referenced by TEST().

Function Documentation

void CheckHashCodeEqual ( Unique< T a,
Unique< U >  b 
)

Definition at line 69 of file test-unique.cc.

References CHECK_EQ, and CHECK_NE.

Referenced by TEST().

void CheckHashCodeNotEqual ( Unique< T a,
Unique< U >  b 
)

Definition at line 79 of file test-unique.cc.

References CHECK_NE.

Referenced by TEST().

TEST ( UniqueSubsume  )
TEST ( UniqueSet_Equals  )
TEST ( UniqueSet_IsSubset1  )
TEST ( UniqueSet_Intersect1  )