]> git.draconx.ca Git - gob-dx.git/blobdiff - tests/interface.at
Use libtool to link programs in the testsuite.
[gob-dx.git] / tests / interface.at
index 113c22a60e19ac7b6beb9e3e331f7224bc14eade..4cc41d9bb02846f72a1d39e474a15c4e343026df 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright © 2020 Nick Bowler
+dnl Copyright © 2020, 2022-2023 Nick Bowler
 dnl License GPLv2+: GNU General Public License version 2 or any later version.
 dnl This is free software: you are free to change and redistribute it.
 dnl There is NO WARRANTY, to the extent permitted by law.
@@ -80,9 +80,7 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test-a.o test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], [test-a.o test-fooable.o main.o])
 AT_CHECK([./main], [0], [42
 ])
 
@@ -118,9 +116,7 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test-a.o test-a-mod.o test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], [test-a.o test-a-mod.o test-fooable.o main.o])
 AT_CHECK([./main], [0], [54
 ])
 
@@ -164,9 +160,7 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test-a.o test-b.o test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], [test-a.o test-b.o test-fooable.o main.o])
 AT_CHECK([./main], [0], [Test:A foo called
 42
 Test:B foo called
@@ -216,10 +210,8 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test-a.o test-b.o test-b-mod.o test-fooable.o main.o])
-
+TEST_LINK_GOBJECT([main],
+  [test-a.o test-b.o test-b-mod.o test-fooable.o main.o])
 AT_CHECK([./main], [0], [Test:A foo called
 42
 Test:B foo called
@@ -271,10 +263,8 @@ int main(void)
 }
 ]])
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test-a.o test-a-mod.o test-b.o test-b-mod.o test-fooable.o main.o])
-
+TEST_LINK_GOBJECT([main],
+  [test-a.o test-a-mod.o test-b.o test-b-mod.o test-fooable.o main.o])
 AT_CHECK([./main], [0], [Test:A foo called
 42
 Test:B foo called
@@ -318,9 +308,7 @@ int main(void)
 ]])
 
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test-a.o test-b.o test-c.o test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], [test-a.o test-b.o test-c.o test-fooable.o main.o])
 AT_CHECK([./main], [0], [Test:C foo called
 Test:B foo called
 Test:A foo called
@@ -371,10 +359,9 @@ int main(void)
 ]])
 
 TEST_COMPILE_GOBJECT([main.c], [0], [], [ignore])
-
-AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main \
-  test-a.o test-a-mod.o test-b.o test-b-mod.o test-c.o test-c-mod.o \
-  test-fooable.o main.o])
+TEST_LINK_GOBJECT([main], m4_join([ ],
+  [test-a.o test-a-mod.o test-b.o test-b-mod.o test-c.o test-c-mod.o],
+  [test-fooable.o main.o]))
 AT_CHECK([./main], [0], [Test:C foo called
 Test:B foo called
 Test:A foo called