Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
dart::TestTraits Class Reference

Static Public Member Functions

static const char * Name ()
 
static bool ReportStats ()
 
static bool IsMatch (const char *key, const Object &obj)
 
static uword Hash (const char *key)
 
static bool IsMatch (const Object &a, const Object &b)
 
static uword Hash (const Object &obj)
 
static ObjectPtr NewKey (const char *key)
 

Detailed Description

Definition at line 21 of file hash_table_test.cc.

Member Function Documentation

◆ Hash() [1/2]

static uword dart::TestTraits::Hash ( const char *  key)
inlinestatic

Definition at line 29 of file hash_table_test.cc.

29{ return static_cast<uword>(strlen(key)); }
uintptr_t uword
Definition globals.h:501

◆ Hash() [2/2]

static uword dart::TestTraits::Hash ( const Object obj)
inlinestatic

Definition at line 34 of file hash_table_test.cc.

34{ return String::Cast(obj).Length(); }

◆ IsMatch() [1/2]

static bool dart::TestTraits::IsMatch ( const char *  key,
const Object obj 
)
inlinestatic

Definition at line 26 of file hash_table_test.cc.

26 {
27 return String::Cast(obj).Equals(key);
28 }

◆ IsMatch() [2/2]

static bool dart::TestTraits::IsMatch ( const Object a,
const Object b 
)
inlinestatic

Definition at line 30 of file hash_table_test.cc.

30 {
31 return a.IsString() && b.IsString() &&
32 String::Cast(a).Equals(String::Cast(b));
33 }
static bool b
struct MyStruct a[10]

◆ Name()

static const char * dart::TestTraits::Name ( )
inlinestatic

Definition at line 23 of file hash_table_test.cc.

23{ return "TestTraits"; }

◆ NewKey()

static ObjectPtr dart::TestTraits::NewKey ( const char *  key)
inlinestatic

Definition at line 35 of file hash_table_test.cc.

35{ return String::New(key); }
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
Definition object.cc:23777

◆ ReportStats()

static bool dart::TestTraits::ReportStats ( )
inlinestatic

Definition at line 24 of file hash_table_test.cc.

24{ return false; }

The documentation for this class was generated from the following file: