<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qmk/tests/basic/test_action_layer.cpp, branch master</title>
<subtitle>Custom split ortholinear mechanical keyboard with rollerball mouse. Firmware. https://blog.node5.net/custom-keyboard
</subtitle>
<id>http://git.node5.net/firmware/qmk/atom?h=master</id>
<link rel='self' href='http://git.node5.net/firmware/qmk/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/'/>
<updated>2023-05-13T07:42:06+00:00</updated>
<entry>
<title>Add a user callback for pre process record (#20584)</title>
<updated>2023-05-13T07:42:06+00:00</updated>
<author>
<name>Albert Y</name>
<email>76888457+filterpaper@users.noreply.github.com</email>
</author>
<published>2023-05-13T07:42:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=128f808496cf7800fde3c7508388745bd99e8016'/>
<id>urn:sha1:128f808496cf7800fde3c7508388745bd99e8016</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix Layer Mod handling of with right-handed mods. (#19845)</title>
<updated>2023-02-14T20:44:42+00:00</updated>
<author>
<name>Pascal Getreuer</name>
<email>50221757+getreuer@users.noreply.github.com</email>
</author>
<published>2023-02-14T20:44:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=7d692d64f3997b816607c282b09fecae14212fe6'/>
<id>urn:sha1:7d692d64f3997b816607c282b09fecae14212fe6</id>
<content type='text'>

</content>
</entry>
<entry>
<title>Introduce VERIFY_AND_CLEAR shorthand (#19370)</title>
<updated>2022-12-18T20:55:14+00:00</updated>
<author>
<name>Stefan Kerkmann</name>
<email>karlk90@pm.me</email>
</author>
<published>2022-12-18T20:55:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=c2b13bd77b71ea73db12a6cda64871565036a6dc'/>
<id>urn:sha1:c2b13bd77b71ea73db12a6cda64871565036a6dc</id>
<content type='text'>
Which is just a syntactic sugar for
testing::Mock::VerifyAndClearExpectations to reduce the visual clutter
in unit-tests.</content>
</entry>
<entry>
<title>Don't clear keys on layer change unless STRICT_LAYER_RELEASE is enabled (#18577)</title>
<updated>2022-11-12T02:11:50+00:00</updated>
<author>
<name>Drashna Jaelre</name>
<email>drashna@live.com</email>
</author>
<published>2022-11-12T02:11:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=1caedd10c45adef49724f5aa0967e23286f4dd38'/>
<id>urn:sha1:1caedd10c45adef49724f5aa0967e23286f4dd38</id>
<content type='text'>
* Don't clear mousekeys unless clearing keys

* Revert "Don't clear mousekeys unless clearing keys"

This reverts commit 29a0c06b547d72b80d416a8b6fab478c77fbd247.

* Just don't clear anything on layer set

* Fix lint

* Enable test?</content>
</entry>
<entry>
<title>Fix and add unit tests for Caps Word to work with Unicode Map, Auto Shift, Retro Shift. (#17284)</title>
<updated>2022-06-05T07:14:02+00:00</updated>
<author>
<name>Pascal Getreuer</name>
<email>50221757+getreuer@users.noreply.github.com</email>
</author>
<published>2022-06-05T07:14:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=95d20e6d8bb1ffaf3024af793daf789ee0b75727'/>
<id>urn:sha1:95d20e6d8bb1ffaf3024af793daf789ee0b75727</id>
<content type='text'>
* Fix Caps Word and Unicode Map

* Tests for Caps Word + Auto Shift and Unicode Map.

* Fix formatting

* Add additional keyboard report expectation macros

This commit defines five test utilities, EXPECT_REPORT, EXPECT_UNICODE,
EXPECT_EMPTY_REPORT, EXPECT_ANY_REPORT and EXPECT_NO_REPORT for use with
TestDriver.

EXPECT_REPORT sets a gmock expectation that a given keyboard report will
be sent. For instance,

  EXPECT_REPORT(driver, (KC_LSFT, KC_A));

is shorthand for

  EXPECT_CALL(driver,
      send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A)));

EXPECT_UNICODE sets a gmock expectation that a given Unicode code point
will be sent using UC_LNX input mode. For instance for U+2013,

  EXPECT_UNICODE(driver, 0x2013);

expects the sequence of keys:

  "Ctrl+Shift+U, 2, 0, 1, 3, space".

EXPECT_EMPTY_REPORT sets a gmock expectation that a given keyboard
report will be sent. For instance

  EXPECT_EMPTY_REPORT(driver);

expects a single report without keypresses or modifiers.

EXPECT_ANY_REPORT sets a gmock expectation that a arbitrary keyboard
report will be sent, without matching its contents. For instance

  EXPECT_ANY_REPORT(driver).Times(1);

expects a single arbitrary keyboard report will be sent.

EXPECT_NO_REPORT sets a gmock expectation that no keyboard report will
be sent at all.

* Add tap_key() and tap_keys() to TestFixture.

This commit adds a `tap_key(key)` method to TestFixture that taps a
given KeymapKey, optionally with a specified delay between press and
release.

Similarly, the method `tap_keys(key_a, key_b, key_c)` taps a sequence of
KeymapKeys.

* Use EXPECT_REPORT, tap_keys, etc. in most tests.

This commit uses EXPECT_REPORT, EXPECT_UNICODE, EXPECT_EMPTY_REPORT,
EXPECT_NO_REPORT, tap_key() and tap_keys() test utilities from the
previous two commits in most tests. Particularly the EXPECT_REPORT
macro is frequently useful and makes a nice reduction in boilerplate
needed to express many tests.

Co-authored-by: David Kosorin &lt;david@kosorin.net&gt;</content>
</entry>
<entry>
<title>[Core] Don't send keyboard reports that propagate no changes to the host  (#14065)</title>
<updated>2021-12-14T18:40:18+00:00</updated>
<author>
<name>Stefan Kerkmann</name>
<email>karlk90@pm.me</email>
</author>
<published>2021-12-14T18:40:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=8b865a9d6445e3bce6c991224f373d71c67e87e5'/>
<id>urn:sha1:8b865a9d6445e3bce6c991224f373d71c67e87e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title> [Tests] Increase QMK test coverage take 2 (#15269)</title>
<updated>2021-11-23T02:31:01+00:00</updated>
<author>
<name>Stefan Kerkmann</name>
<email>karlk90@pm.me</email>
</author>
<published>2021-11-23T02:31:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=a24bdccee0580d1263733bc7e66e4e4f97713f19'/>
<id>urn:sha1:a24bdccee0580d1263733bc7e66e4e4f97713f19</id>
<content type='text'>
* Add per-test keymaps

* Add better trace and info logs for failed unit-tests

* Add layer state assertion with tracing message

* Use individual test binaries configuration options

* Add basic qmk functionality tests

* Add tap hold configurations tests

* Add auto shift tests

Co-authored-by: Nick Brassel &lt;nick@tzarc.org&gt;</content>
</entry>
<entry>
<title>Revert "[Tests] Increase QMK test coverage (#13789)"</title>
<updated>2021-11-22T22:54:04+00:00</updated>
<author>
<name>Nick Brassel</name>
<email>nick@tzarc.org</email>
</author>
<published>2021-11-22T22:54:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=7746aefe94cc4cd492bfafdef73d95d073f0603b'/>
<id>urn:sha1:7746aefe94cc4cd492bfafdef73d95d073f0603b</id>
<content type='text'>
This reverts commit b6054c0206609f3755f71d819643644d250288b0.
</content>
</entry>
<entry>
<title>[Tests] Increase QMK test coverage (#13789)</title>
<updated>2021-11-22T21:15:04+00:00</updated>
<author>
<name>Stefan Kerkmann</name>
<email>karlk90@pm.me</email>
</author>
<published>2021-11-22T21:15:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=b6054c0206609f3755f71d819643644d250288b0'/>
<id>urn:sha1:b6054c0206609f3755f71d819643644d250288b0</id>
<content type='text'>
* Add per-test keymaps

* Add better trace and info logs for failed unit-tests

* Add layer state assertion with tracing message

* Use individual test binaries configuration options

* Add basic qmk functionality tests

* Add tap hold configurations tests

* Add auto shift tests

* `qmk format-c

* Fix tests

Co-authored-by: Nick Brassel &lt;nick@tzarc.org&gt;</content>
</entry>
<entry>
<title>add tests for action_layer.c and reset layer state after tests</title>
<updated>2017-12-15T18:23:30+00:00</updated>
<author>
<name>Colin T.A. Gray</name>
<email>colinta@gmail.com</email>
</author>
<published>2017-12-14T23:15:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.node5.net/firmware/qmk/commit/?id=4ea3bbdb4cbb02310623c9dfc464d84e4f653492'/>
<id>urn:sha1:4ea3bbdb4cbb02310623c9dfc464d84e4f653492</id>
<content type='text'>
</content>
</entry>
</feed>
