Flutter Engine
 
Loading...
Searching...
No Matches
deps_parser_unittests.cc File Reference
#include "flutter/tools/licenses_cpp/src/deps_parser.h"
#include "gtest/gtest.h"

Go to the source code of this file.

Functions

 TEST (DepsParserTest, Trivial)
 
 TEST (DepsParserTest, ParseDepsWithWhitespace)
 

Function Documentation

◆ TEST() [1/2]

TEST ( DepsParserTest  ,
ParseDepsWithWhitespace   
)

Definition at line 13 of file deps_parser_unittests.cc.

13 {
14 DepsParser parser;
15 std::string input = R"(# Yadda yadda
16foo = {}
17deps = {
18 'engine/src/flutter/third_party/harfbuzz':
19 Var('flutter_git') + '/third_party/harfbuzz' + '@' + 'ea6a172f84f2cbcfed803b5ae71064c7afb6b5c2',
20 'engine/src/flutter/third_party/dart/tools/sdks/dart-sdk':
21 {'dep_type': 'cipd', 'packages': [{'package': 'dart/dart-sdk/${{platform}}', 'version': 'git_revision:4bb26ad346b166d759773e01ffc8247893b9681e'}]},
22 'third_party/doof':
23 {'packages': [{'package': 'doof', 'version': '1.0'}], 'dep_type': 'cipd'},
24}
25)";
26 std::vector<std::string> expected = {
27 "engine/src/flutter/third_party/dart/tools/sdks/dart-sdk",
28 "third_party/doof"};
29
30 std::vector<std::string> actual = parser.Parse(input);
31
32 ASSERT_EQ(actual.size(), expected.size());
33 EXPECT_EQ(actual[0], expected[0]);
34 EXPECT_EQ(actual[1], expected[1]);
35}
std::vector< std::string > Parse(std::string_view input)
static int input(yyscan_t yyscanner)

References input(), and DepsParser::Parse().

◆ TEST() [2/2]

TEST ( DepsParserTest  ,
Trivial   
)

Definition at line 8 of file deps_parser_unittests.cc.

8 {
9 DepsParser parser;
10 ASSERT_TRUE(true);
11}