Flutter Engine
testing.h File Reference
#include <string>
#include <vector>
#include "flutter/fml/file.h"
#include "flutter/fml/mapping.h"
#include "flutter/testing/assertions.h"
#include "gtest/gtest.h"

Go to the source code of this file.

Namespaces

 flutter
 
 flutter::testing
 

Enumerations

enum  flutter::testing::MemsetPatternOp {
  flutter::testing::MemsetPatternOp::kMemsetPatternOpSetBuffer,
  flutter::testing::MemsetPatternOp::kMemsetPatternOpCheckBuffer
}
 

Functions

const char * flutter::testing::GetFixturesPath ()
 Returns the directory containing the test fixture for the target if this target has fixtures configured. If there are no fixtures, this is a link error. If you see a linker error on this symbol, the unit-test target needs to depend on a test_fixtures target. More...
 
fml::UniqueFD flutter::testing::OpenFixturesDirectory ()
 Opens the fixtures directory for the unit-test harness. More...
 
fml::UniqueFD flutter::testing::OpenFixture (std::string fixture_name)
 Opens a fixture of the given file name. More...
 
std::unique_ptr< fml::Mappingflutter::testing::OpenFixtureAsMapping (std::string fixture_name)
 Opens a fixture of the given file name and returns a mapping to its contents. More...
 
std::string flutter::testing::GetCurrentTestName ()
 Gets the name of the currently running test. This is useful in generating logs or assets based on test name. More...
 
bool flutter::testing::MemsetPatternSetOrCheck (uint8_t *buffer, size_t size, MemsetPatternOp op)
 Depending on the operation, either scribbles a known pattern into the buffer or checks if that pattern is present in an existing buffer. This is a portable variant of the memset_pattern class of methods that also happen to do assert that the same pattern exists. More...
 
bool flutter::testing::MemsetPatternSetOrCheck (std::vector< uint8_t > &buffer, MemsetPatternOp op)