diff options
author | Joel Challis <git@zvecr.com> | 2021-11-01 19:18:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 19:18:33 +0000 |
commit | 92385e30cdad61ddfc0461b1ce1340bcb494a68a (patch) | |
tree | d472f93ed9f4e42e4972630d8178a387b91a51bc /quantum/debounce/tests/sym_eager_pk_tests.cpp | |
parent | ee371c1295f00c119dd5a1bb2f3d4acedff832a7 (diff) | |
download | qmk_firmware-92385e30cdad61ddfc0461b1ce1340bcb494a68a.tar.gz qmk_firmware-92385e30cdad61ddfc0461b1ce1340bcb494a68a.zip |
Manually format develop (#15003)
Diffstat (limited to 'quantum/debounce/tests/sym_eager_pk_tests.cpp')
-rw-r--r-- | quantum/debounce/tests/sym_eager_pk_tests.cpp | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/quantum/debounce/tests/sym_eager_pk_tests.cpp b/quantum/debounce/tests/sym_eager_pk_tests.cpp index e0fc205e3..d9a02fe33 100644 --- a/quantum/debounce/tests/sym_eager_pk_tests.cpp +++ b/quantum/debounce/tests/sym_eager_pk_tests.cpp | |||
@@ -19,7 +19,8 @@ | |||
19 | #include "debounce_test_common.h" | 19 | #include "debounce_test_common.h" |
20 | 20 | ||
21 | TEST_F(DebounceTest, OneKeyShort1) { | 21 | TEST_F(DebounceTest, OneKeyShort1) { |
22 | addEvents({ /* Time, Inputs, Outputs */ | 22 | addEvents({ |
23 | /* Time, Inputs, Outputs */ | ||
23 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 24 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
24 | {1, {{0, 1, UP}}, {}}, | 25 | {1, {{0, 1, UP}}, {}}, |
25 | 26 | ||
@@ -32,7 +33,8 @@ TEST_F(DebounceTest, OneKeyShort1) { | |||
32 | } | 33 | } |
33 | 34 | ||
34 | TEST_F(DebounceTest, OneKeyShort2) { | 35 | TEST_F(DebounceTest, OneKeyShort2) { |
35 | addEvents({ /* Time, Inputs, Outputs */ | 36 | addEvents({ |
37 | /* Time, Inputs, Outputs */ | ||
36 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 38 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
37 | {1, {{0, 1, UP}}, {}}, | 39 | {1, {{0, 1, UP}}, {}}, |
38 | 40 | ||
@@ -45,7 +47,8 @@ TEST_F(DebounceTest, OneKeyShort2) { | |||
45 | } | 47 | } |
46 | 48 | ||
47 | TEST_F(DebounceTest, OneKeyShort3) { | 49 | TEST_F(DebounceTest, OneKeyShort3) { |
48 | addEvents({ /* Time, Inputs, Outputs */ | 50 | addEvents({ |
51 | /* Time, Inputs, Outputs */ | ||
49 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 52 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
50 | {1, {{0, 1, UP}}, {}}, | 53 | {1, {{0, 1, UP}}, {}}, |
51 | 54 | ||
@@ -58,7 +61,8 @@ TEST_F(DebounceTest, OneKeyShort3) { | |||
58 | } | 61 | } |
59 | 62 | ||
60 | TEST_F(DebounceTest, OneKeyShort4) { | 63 | TEST_F(DebounceTest, OneKeyShort4) { |
61 | addEvents({ /* Time, Inputs, Outputs */ | 64 | addEvents({ |
65 | /* Time, Inputs, Outputs */ | ||
62 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 66 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
63 | {1, {{0, 1, UP}}, {}}, | 67 | {1, {{0, 1, UP}}, {}}, |
64 | 68 | ||
@@ -71,7 +75,8 @@ TEST_F(DebounceTest, OneKeyShort4) { | |||
71 | } | 75 | } |
72 | 76 | ||
73 | TEST_F(DebounceTest, OneKeyShort5) { | 77 | TEST_F(DebounceTest, OneKeyShort5) { |
74 | addEvents({ /* Time, Inputs, Outputs */ | 78 | addEvents({ |
79 | /* Time, Inputs, Outputs */ | ||
75 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 80 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
76 | {1, {{0, 1, UP}}, {}}, | 81 | {1, {{0, 1, UP}}, {}}, |
77 | 82 | ||
@@ -83,7 +88,8 @@ TEST_F(DebounceTest, OneKeyShort5) { | |||
83 | } | 88 | } |
84 | 89 | ||
85 | TEST_F(DebounceTest, OneKeyShort6) { | 90 | TEST_F(DebounceTest, OneKeyShort6) { |
86 | addEvents({ /* Time, Inputs, Outputs */ | 91 | addEvents({ |
92 | /* Time, Inputs, Outputs */ | ||
87 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 93 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
88 | {1, {{0, 1, UP}}, {}}, | 94 | {1, {{0, 1, UP}}, {}}, |
89 | 95 | ||
@@ -95,7 +101,8 @@ TEST_F(DebounceTest, OneKeyShort6) { | |||
95 | } | 101 | } |
96 | 102 | ||
97 | TEST_F(DebounceTest, OneKeyBouncing1) { | 103 | TEST_F(DebounceTest, OneKeyBouncing1) { |
98 | addEvents({ /* Time, Inputs, Outputs */ | 104 | addEvents({ |
105 | /* Time, Inputs, Outputs */ | ||
99 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 106 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
100 | {1, {{0, 1, UP}}, {}}, | 107 | {1, {{0, 1, UP}}, {}}, |
101 | {2, {{0, 1, DOWN}}, {}}, | 108 | {2, {{0, 1, DOWN}}, {}}, |
@@ -110,7 +117,8 @@ TEST_F(DebounceTest, OneKeyBouncing1) { | |||
110 | } | 117 | } |
111 | 118 | ||
112 | TEST_F(DebounceTest, OneKeyBouncing2) { | 119 | TEST_F(DebounceTest, OneKeyBouncing2) { |
113 | addEvents({ /* Time, Inputs, Outputs */ | 120 | addEvents({ |
121 | /* Time, Inputs, Outputs */ | ||
114 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 122 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
115 | /* Change twice in the same time period */ | 123 | /* Change twice in the same time period */ |
116 | {1, {{0, 1, UP}}, {}}, | 124 | {1, {{0, 1, UP}}, {}}, |
@@ -135,7 +143,8 @@ TEST_F(DebounceTest, OneKeyBouncing2) { | |||
135 | } | 143 | } |
136 | 144 | ||
137 | TEST_F(DebounceTest, OneKeyLong) { | 145 | TEST_F(DebounceTest, OneKeyLong) { |
138 | addEvents({ /* Time, Inputs, Outputs */ | 146 | addEvents({ |
147 | /* Time, Inputs, Outputs */ | ||
139 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 148 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
140 | 149 | ||
141 | {25, {{0, 1, UP}}, {{0, 1, UP}}}, | 150 | {25, {{0, 1, UP}}, {{0, 1, UP}}}, |
@@ -146,7 +155,8 @@ TEST_F(DebounceTest, OneKeyLong) { | |||
146 | } | 155 | } |
147 | 156 | ||
148 | TEST_F(DebounceTest, TwoKeysShort) { | 157 | TEST_F(DebounceTest, TwoKeysShort) { |
149 | addEvents({ /* Time, Inputs, Outputs */ | 158 | addEvents({ |
159 | /* Time, Inputs, Outputs */ | ||
150 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 160 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
151 | {1, {{0, 1, UP}}, {}}, | 161 | {1, {{0, 1, UP}}, {}}, |
152 | {2, {{0, 2, DOWN}}, {{0, 2, DOWN}}}, | 162 | {2, {{0, 2, DOWN}}, {{0, 2, DOWN}}}, |
@@ -167,7 +177,8 @@ TEST_F(DebounceTest, TwoKeysShort) { | |||
167 | } | 177 | } |
168 | 178 | ||
169 | TEST_F(DebounceTest, OneKeyDelayedScan1) { | 179 | TEST_F(DebounceTest, OneKeyDelayedScan1) { |
170 | addEvents({ /* Time, Inputs, Outputs */ | 180 | addEvents({ |
181 | /* Time, Inputs, Outputs */ | ||
171 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 182 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
172 | 183 | ||
173 | /* Processing is very late but the change will now be accepted */ | 184 | /* Processing is very late but the change will now be accepted */ |
@@ -178,7 +189,8 @@ TEST_F(DebounceTest, OneKeyDelayedScan1) { | |||
178 | } | 189 | } |
179 | 190 | ||
180 | TEST_F(DebounceTest, OneKeyDelayedScan2) { | 191 | TEST_F(DebounceTest, OneKeyDelayedScan2) { |
181 | addEvents({ /* Time, Inputs, Outputs */ | 192 | addEvents({ |
193 | /* Time, Inputs, Outputs */ | ||
182 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 194 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
183 | 195 | ||
184 | /* Processing is very late but the change will now be accepted even with a 1 scan delay */ | 196 | /* Processing is very late but the change will now be accepted even with a 1 scan delay */ |
@@ -190,7 +202,8 @@ TEST_F(DebounceTest, OneKeyDelayedScan2) { | |||
190 | } | 202 | } |
191 | 203 | ||
192 | TEST_F(DebounceTest, OneKeyDelayedScan3) { | 204 | TEST_F(DebounceTest, OneKeyDelayedScan3) { |
193 | addEvents({ /* Time, Inputs, Outputs */ | 205 | addEvents({ |
206 | /* Time, Inputs, Outputs */ | ||
194 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 207 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
195 | 208 | ||
196 | /* Processing is very late but the change will now be accepted even with a 1ms delay */ | 209 | /* Processing is very late but the change will now be accepted even with a 1ms delay */ |
@@ -202,7 +215,8 @@ TEST_F(DebounceTest, OneKeyDelayedScan3) { | |||
202 | } | 215 | } |
203 | 216 | ||
204 | TEST_F(DebounceTest, OneKeyDelayedScan4) { | 217 | TEST_F(DebounceTest, OneKeyDelayedScan4) { |
205 | addEvents({ /* Time, Inputs, Outputs */ | 218 | addEvents({ |
219 | /* Time, Inputs, Outputs */ | ||
206 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 220 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
207 | 221 | ||
208 | /* Processing is a bit late but the change will now be accepted */ | 222 | /* Processing is a bit late but the change will now be accepted */ |
@@ -213,7 +227,8 @@ TEST_F(DebounceTest, OneKeyDelayedScan4) { | |||
213 | } | 227 | } |
214 | 228 | ||
215 | TEST_F(DebounceTest, OneKeyDelayedScan5) { | 229 | TEST_F(DebounceTest, OneKeyDelayedScan5) { |
216 | addEvents({ /* Time, Inputs, Outputs */ | 230 | addEvents({ |
231 | /* Time, Inputs, Outputs */ | ||
217 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 232 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
218 | 233 | ||
219 | /* Processing is very late but the change will now be accepted even with a 1 scan delay */ | 234 | /* Processing is very late but the change will now be accepted even with a 1 scan delay */ |
@@ -225,7 +240,8 @@ TEST_F(DebounceTest, OneKeyDelayedScan5) { | |||
225 | } | 240 | } |
226 | 241 | ||
227 | TEST_F(DebounceTest, OneKeyDelayedScan6) { | 242 | TEST_F(DebounceTest, OneKeyDelayedScan6) { |
228 | addEvents({ /* Time, Inputs, Outputs */ | 243 | addEvents({ |
244 | /* Time, Inputs, Outputs */ | ||
229 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, | 245 | {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, |
230 | 246 | ||
231 | /* Processing is very late but the change will now be accepted even with a 1ms delay */ | 247 | /* Processing is very late but the change will now be accepted even with a 1ms delay */ |