Bring route, settings, and language tests up to date
The route host test checks web routing but built the host without the web define, so every route query came back empty; it also links Ziran's byte text module now. Settings and language tests put Kryon's style sheet modules on the module path, expect the current switch width, and give the settings mutation test the line host its section dividers use.
This commit is contained in:
1 parent
7ca7ea8a44
commit
73683845c9
7 files changed
+22
-10
No files matched your search
@@ -745,7 +745,7 @@ route-host-test: $(ZI2C_BIN)
|
||||
@$(ZI2C_BIN) --no-main --root src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
-o $(BUILD_DIR)/route-host-test/generated src/app/route_log.zi
|
||||
@$(ZI2C_BIN) --no-main --root src \
|
||||
@$(ZI2C_BIN) --no-main --root src --define PLATFORM_WEB \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
-o $(BUILD_DIR)/route-host-test/generated src/app/route_host.zi
|
||||
@$(CC) -std=c11 -ffunction-sections -fdata-sections \
|
||||
@@ -754,6 +754,7 @@ route-host-test: $(ZI2C_BIN)
|
||||
tests/route_host_test.c \
|
||||
$(BUILD_DIR)/route-host-test/generated/c_string.c \
|
||||
$(BUILD_DIR)/route-host-test/generated/text_buffers.c \
|
||||
$(BUILD_DIR)/route-host-test/generated/byte_text_linux.c \
|
||||
$(BUILD_DIR)/route-host-test/generated/app/route_log.c \
|
||||
$(BUILD_DIR)/route-host-test/generated/app/route_host.c \
|
||||
-I$(KRYON_DIR)/include \
|
||||
|
||||
@@ -8,10 +8,12 @@ mkdir -p "$work/c"
|
||||
|
||||
"$bin/zi2zir" --check-only --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
"$root/src/app/language_selection.zi"
|
||||
"$bin/zi2c" --no-main --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
-o "$work/c" "$root/src/app/language_selection.zi"
|
||||
"${CC:-cc}" -std=c11 -Wall -Wextra -Werror \
|
||||
|
||||
@@ -32,14 +32,6 @@ void app_log_line(uint8_t *line)
|
||||
app_log_info("%s", (const char *)line);
|
||||
}
|
||||
|
||||
String app_text_from_cstring(uint8_t *text, int32_t capacity)
|
||||
{
|
||||
int32_t length = 0;
|
||||
while (length < capacity && text[length] != 0)
|
||||
length++;
|
||||
return StringView((const char *)text, (size_t)length);
|
||||
}
|
||||
|
||||
uint8_t *GetRoutePath(void) { return (uint8_t *)"/app"; }
|
||||
uint8_t *GetRouteHash(void) { return (uint8_t *)"#/start"; }
|
||||
int GetRouteVersion(void) { return 7; }
|
||||
|
||||
@@ -68,6 +68,14 @@ RasterRoundedRectangle :: (bounds: Rectangle, radius: float32,
|
||||
TestFail(80)
|
||||
}
|
||||
|
||||
// Section dividers queue lines; this test never rasterizes them.
|
||||
#program_export
|
||||
RasterLine :: (line: Rectangle, color: Color) {
|
||||
unused line
|
||||
unused color
|
||||
TestFail(90)
|
||||
}
|
||||
|
||||
#program_export
|
||||
RasterRoundedRectangleOutline :: (bounds: Rectangle, radius: float32,
|
||||
segments: s32, width: float32, color: Color) {
|
||||
|
||||
@@ -7,6 +7,7 @@ trap 'rm -rf "$work"' EXIT HUP INT TERM
|
||||
sh "$root/scripts/run-ziran.sh" "$bin/zi2c" --no-main --root "$root" \
|
||||
--module-path "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
--module-path "$root/build/packages/daochi-client" \
|
||||
-o "$work/c" "$root/tests/settings_mutation_behavior.zi"
|
||||
|
||||
@@ -72,7 +72,7 @@ int main(void)
|
||||
app.ui.session = SessionOpen();
|
||||
assert(SessionValid(app.ui.session));
|
||||
AppMetricsConfigure(1.0f);
|
||||
assert(toggle_switch_width() == 54);
|
||||
assert(toggle_switch_width() == 50);
|
||||
assert(toggle_row_height(label, 300) >= 52);
|
||||
|
||||
TreeStart(app.ui.session, 1, (Rectangle){0, 0, 400, 300});
|
||||
|
||||
@@ -9,10 +9,12 @@ trap 'rm -rf "$work"' EXIT HUP INT TERM
|
||||
mkdir -p "$work/c"
|
||||
"$bin/zi2zir" --check-only --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
"$root/src/screens/settings/settings_ui.zi"
|
||||
"$bin/zi2c" --no-main --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
-o "$work/c" "$root/src/screens/settings/settings_ui.zi"
|
||||
set -- "$root/tests/settings_ui_link_test.c"
|
||||
@@ -26,10 +28,12 @@ env -u DISPLAY -u WAYLAND_DISPLAY "$work/test"
|
||||
mkdir -p "$work/device"
|
||||
"$bin/zi2zir" --check-only --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
"$root/src/screens/settings/settings_device.zi"
|
||||
"$bin/zi2c" --no-main --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
-o "$work/device" "$root/src/screens/settings/settings_device.zi"
|
||||
"${CC:-cc}" -std=c11 -Wno-unused-function \
|
||||
@@ -39,10 +43,12 @@ mkdir -p "$work/device"
|
||||
mkdir -p "$work/breaks"
|
||||
"$bin/zi2zir" --check-only --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
"$root/src/screens/settings/settings_breaks.zi"
|
||||
"$bin/zi2c" --no-main --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
-o "$work/breaks" "$root/src/screens/settings/settings_breaks.zi"
|
||||
"${CC:-cc}" -std=c11 -Wno-unused-function -Wno-unused-variable \
|
||||
@@ -52,10 +58,12 @@ mkdir -p "$work/breaks"
|
||||
mkdir -p "$work/notifications"
|
||||
"$bin/zi2zir" --check-only --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
"$root/src/screens/settings/settings_notifications.zi"
|
||||
"$bin/zi2c" --no-main --root "$root/src" \
|
||||
--module-path "$root/build/packages/kryon/src/ui" \
|
||||
--module-path "$root/build/packages/kryon/src/kss" \
|
||||
--module-path "$root/build/packages/ziran/std" \
|
||||
-o "$work/notifications" \
|
||||
"$root/src/screens/settings/settings_notifications.zi"
|
||||
|
||||
Reference in new issue
Block a user