summaryrefslogtreecommitdiff
path: root/libmisc/tests
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-31 14:42:03 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-06-02 15:08:25 -0600
commit559627b00b74e11e394589bfcc8864b0f22d7e1b (patch)
tree45d54aca9fd5a4bb67ad55e50b71eaa6713894c0 /libmisc/tests
parentf428acdaf8c8851323391a949f0a9cbcf521adda (diff)
libmisc: obj.h: Use LM_DEFAPPEND() to implement magic LO_BOX()
Diffstat (limited to 'libmisc/tests')
-rw-r--r--libmisc/tests/test_obj.c2
-rw-r--r--libmisc/tests/test_obj_nest.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libmisc/tests/test_obj.c b/libmisc/tests/test_obj.c
index 687ad4e..a13b8c9 100644
--- a/libmisc/tests/test_obj.c
+++ b/libmisc/tests/test_obj.c
@@ -53,7 +53,7 @@ int main() {
struct myclass obj = {
.a = MAGIC1,
};
- lo_interface frobber iface = lo_box_myclass_as_frobber(&obj);
+ lo_interface frobber iface = LO_BOX(frobber, &obj);
test_assert(LO_CALL(iface, frob) == MAGIC1);
test_assert(LO_CALL(iface, frob1, MAGIC2) == MAGIC2);
LO_CALL(iface, frob0);
diff --git a/libmisc/tests/test_obj_nest.c b/libmisc/tests/test_obj_nest.c
index d5e563e..ba5ac37 100644
--- a/libmisc/tests/test_obj_nest.c
+++ b/libmisc/tests/test_obj_nest.c
@@ -64,7 +64,7 @@ static ssize_t myclass_write(struct myclass *self, void *buf, size_t count) {
int main() {
struct myclass _obj = {};
- lo_interface read_writer obj = lo_box_myclass_as_read_writer(&_obj);
+ lo_interface read_writer obj = LO_BOX(read_writer, &_obj);
test_assert(LO_CALL(obj, write, "Hello", 6) == 6);
char buf[6] = {};
test_assert(LO_CALL(obj, read, buf, 3) == 3);