-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
116 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/test/test.exe | ||
*.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include QMK_KEYBOARD_H | ||
#include "shim/qmk.h" | ||
|
||
void qmk_register_unicode(uint32_t code_point) { | ||
register_unicode(code_point); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef QMK_SHIM_H | ||
#define QMK_SHIM_H | ||
|
||
#include <stdint.h> | ||
#include <stdbool.h> | ||
|
||
void qmk_register_unicode(uint32_t code_point); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
CC=gcc | ||
CFLAGS=-I. -Wall -I../ -Ilib/ | ||
|
||
SRC=$(wildcard *.c) | ||
BIN=test | ||
SRCS = $(wildcard *.c) | ||
BINS = $(patsubst %.c,%,$(SRCS)) | ||
|
||
all: build execute | ||
all: execute | ||
|
||
build: | ||
$(CC) $(SRC) -o $(BIN) $(CFLAGS) | ||
%: %.c | ||
$(CC) $(CFLAGS) -o $@ $< | ||
|
||
execute: | ||
./$(BIN) | ||
execute: $(BINS) | ||
./$(BINS) | ||
|
||
clean: | ||
rm -f $(BIN) | ||
clean: | ||
rm -f $(BINS) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#include <acutest.h> | ||
#include "features/umlaut.c" | ||
|
||
uint32_t last_registered_point; | ||
uint32_t get_unicode_point(enum unicode_names name) { return name; } | ||
void qmk_register_unicode(uint32_t code_point) { last_registered_point = code_point; } | ||
|
||
void test_ae(void) | ||
{ | ||
reset_umlaut(); | ||
print_ae(); | ||
TEST_CHECK(last_registered_point == U_ae); | ||
} | ||
|
||
void test_oe(void) | ||
{ | ||
reset_umlaut(); | ||
print_oe(); | ||
TEST_CHECK(last_registered_point == U_oe); | ||
} | ||
|
||
void test_ue(void) | ||
{ | ||
reset_umlaut(); | ||
print_ue(); | ||
TEST_CHECK(last_registered_point == U_ue); | ||
} | ||
|
||
void test_shift_ae(void) | ||
{ | ||
reset_umlaut(); | ||
toggle_umlaut_shift(); | ||
print_ae(); | ||
TEST_CHECK(last_registered_point == U_AE); | ||
} | ||
|
||
void test_shift_oe(void) | ||
{ | ||
reset_umlaut(); | ||
toggle_umlaut_shift(); | ||
print_oe(); | ||
TEST_CHECK(last_registered_point == U_OE); | ||
} | ||
|
||
void test_shift_ue(void) | ||
{ | ||
reset_umlaut(); | ||
toggle_umlaut_shift(); | ||
print_ue(); | ||
TEST_CHECK(last_registered_point == U_UE); | ||
} | ||
|
||
void test_shift_shift_ae(void) | ||
{ | ||
reset_umlaut(); | ||
toggle_umlaut_shift(); | ||
toggle_umlaut_shift(); | ||
print_ae(); | ||
TEST_CHECK(last_registered_point == U_ae); | ||
} | ||
|
||
void test_shift_reset_ae(void) | ||
{ | ||
reset_umlaut(); | ||
toggle_umlaut_shift(); | ||
reset_umlaut(); | ||
print_ae(); | ||
TEST_CHECK(last_registered_point == U_ae); | ||
} | ||
|
||
TEST_LIST = { | ||
{ "test_ae", test_ae }, | ||
{ "test_ue", test_ue }, | ||
{ "test_oe", test_oe }, | ||
{ "test_shift_ae", test_shift_ae }, | ||
{ "test_shift_ue", test_shift_ue }, | ||
{ "test_shift_oe", test_shift_oe }, | ||
{ "test_shift_shift_ae", test_shift_shift_ae }, | ||
{ "test_shift_reset_ae", test_shift_reset_ae }, | ||
{ NULL, NULL } | ||
}; |