kee

Offline IOU signer with QR as transport
git clone https://holbrook.no/src/kee
Info | Log | Files | Refs | README | LICENSE

commit 5a1d336d2205561a61cc9e2e556bfe0cdeb2f018
parent 2cfcda3e0c4556a11918997d81d6ead71adc7aa4
Author: lash <dev@holbrook.no>
Date:   Wed, 24 Apr 2024 09:36:12 +0100

Rehabilitate nav test

Diffstat:
Msrc/gtk/tests/Makefile | 2+-
Msrc/gtk/tests/nav.c | 19+++++++++++++------
2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/gtk/tests/Makefile b/src/gtk/tests/Makefile @@ -5,7 +5,7 @@ LINKOBJS := $(wildcard ../../*.o) $(wildcard ../*.o) INCLUDES := -I../.. -I.. CFLAGS += `pkg-config --cflags gtk4 gstreamer-1.0` $(INCLUDES) -Wall #LIBS := `pkg-config --libs gtk4 zlib lmdb libgcrypt libxdg-basedir gstreamer-1.0` -lb64 -lvarint -lcmime -llash -LIBS := `pkg-config --libs gtk4 zlib lmdb libgcrypt libxdg-basedir gstreamer-1.0` -lb64 -lcmime -llash +LIBS := `pkg-config --libs gtk4 zlib lmdb libgcrypt libxdg-basedir gstreamer-1.0` -lb64 -lcmime -llash -ltasn1 -lldap LDFLAGS += $(LIBS) all: $(OBJS) diff --git a/src/gtk/tests/nav.c b/src/gtk/tests/nav.c @@ -14,25 +14,32 @@ int main(int argc, char **argv) { b = gtk_label_new("bar"); c = gtk_label_new("baz"); - kee_nav_push(&nav, a); - kee_nav_push(&nav, b); + memset(&nav, 0, sizeof(struct KeeNav)); + r = kee_nav_push(&nav, a); + if (r) { + return 1; + } + r = kee_nav_push(&nav, b); + if (r) { + return 1; + } r = kee_nav_pop(&nav); - if (r != b) { + if (r != a) { return 1; } kee_nav_push(&nav, b); r = kee_nav_pop(&nav); - if (r != b) { + if (r != a) { return 1; } r = kee_nav_pop(&nav); - if (r != a) { + if (r != NULL) { return 1; } kee_nav_push(&nav, c); r = kee_nav_pop(&nav); - if (r != c) { + if (r != NULL) { return 1; }