Flutter Engine
minikin::ICUTestBase Class Reference

#include <ICUTestBase.h>

Inheritance diagram for minikin::ICUTestBase:

Protected Member Functions

virtual void SetUp () override
 
virtual void TearDown () override
 

Detailed Description

Definition at line 31 of file ICUTestBase.h.

Member Function Documentation

◆ SetUp()

virtual void minikin::ICUTestBase::SetUp ( )
inlineoverrideprotectedvirtual

Definition at line 33 of file ICUTestBase.h.

33  {
34  const char* fn = "/system/usr/icu/" U_ICUDATA_NAME ".dat";
35  int fd = open(fn, O_RDONLY);
36  ASSERT_NE(-1, fd);
37  struct stat sb;
38  ASSERT_EQ(0, fstat(fd, &sb));
39  void* data = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
40 
41  UErrorCode errorCode = U_ZERO_ERROR;
42  udata_setCommonData(data, &errorCode);
43  ASSERT_TRUE(U_SUCCESS(errorCode));
44  u_init(&errorCode);
45  ASSERT_TRUE(U_SUCCESS(errorCode));
46  }

◆ TearDown()

virtual void minikin::ICUTestBase::TearDown ( )
inlineoverrideprotectedvirtual

Definition at line 48 of file ICUTestBase.h.

48 { u_cleanup(); }

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