Flutter Engine
The Flutter Engine
Classes | Namespaces | Functions | Variables
build_info_unittests.cc File Reference
#include "build_info.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <lib/async-loop/cpp/loop.h>
#include <lib/async-loop/default.h>
#include <lib/inspect/cpp/reader.h>

Go to the source code of this file.

Classes

class  dart_utils::BuildInfoTest
 

Namespaces

namespace  dart_utils
 

Functions

void checkProperty (inspect::Hierarchy &root, const std::string &name, const std::string &expected_value)
 
 dart_utils::TEST_F (BuildInfoTest, AllPropertiesAreDefined)
 
 dart_utils::TEST_F (BuildInfoTest, AllPropertiesAreDumped)
 

Variables

const std::string & inspect_node_name = "build_info_unittests"
 

Function Documentation

◆ checkProperty()

void checkProperty ( inspect::Hierarchy &  root,
const std::string &  name,
const std::string &  expected_value 
)

Definition at line 15 of file build_info_unittests.cc.

17 {
18 const inspect::Hierarchy* build_info = root.GetByPath({inspect_node_name});
19 EXPECT_TRUE(build_info != nullptr);
20 auto* actual_value =
21 build_info->node().get_property<inspect::StringPropertyValue>(name);
22 EXPECT_TRUE(actual_value != nullptr);
23 EXPECT_EQ(actual_value->value(), expected_value);
24}
const std::string & inspect_node_name
static const char * expected_value
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
string root
Definition: scale_cpu.py:20
#define EXPECT_TRUE(handle)
Definition: unit_test.h:678

Variable Documentation

◆ inspect_node_name

const std::string& inspect_node_name = "build_info_unittests"

Definition at line 13 of file build_info_unittests.cc.