Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
key_mapping_test.cc File Reference
#include "key_mapping.h"
#include <gmodule.h>
#include <algorithm>
#include <vector>
#include "gtest/gtest.h"

Go to the source code of this file.

Functions

bool operator== (const LayoutGoal &a, const LayoutGoal &b)
 
 TEST (KeyMappingTest, HasExpectedValues)
 

Function Documentation

◆ operator==()

bool operator== ( const LayoutGoal a,
const LayoutGoal b 
)

Definition at line 12 of file key_mapping_test.cc.

12 {
13 return a.keycode == b.keycode && a.logical_key == b.logical_key &&
14 a.mandatory == b.mandatory;
15}
static bool b
struct MyStruct a[10]

◆ TEST()

TEST ( KeyMappingTest  ,
HasExpectedValues   
)

Definition at line 19 of file key_mapping_test.cc.

19 {
20 // Has Space
21 EXPECT_NE(std::find(layout_goals.begin(), layout_goals.end(),
22 LayoutGoal{0x41, 0x20, false}),
23 layout_goals.end());
24 // Has Digit0
25 EXPECT_NE(std::find(layout_goals.begin(), layout_goals.end(),
26 LayoutGoal{0x13, 0x30, true}),
27 layout_goals.end());
28 // Has KeyA
29 EXPECT_NE(std::find(layout_goals.begin(), layout_goals.end(),
30 LayoutGoal{0x26, 0x61, true}),
31 layout_goals.end());
32 // Has Equal
33 EXPECT_NE(std::find(layout_goals.begin(), layout_goals.end(),
34 LayoutGoal{0x15, 0x3d, false}),
35 layout_goals.end());
36 // Has IntlBackslash
37 EXPECT_NE(std::find(layout_goals.begin(), layout_goals.end(),
38 LayoutGoal{0x5e, 0x200000020, false}),
39 layout_goals.end());
40}
const std::vector< LayoutGoal > layout_goals