simple test for exporting variables in static libs

master
Sahnvour 2019-09-21 17:42:00 +02:00
parent 1bde3b6821
commit 912c1c24c3
3 changed files with 7 additions and 0 deletions

View File

@ -2,3 +2,5 @@
uint32_t add(uint32_t a, uint32_t b) {
return a + b;
}
uint32_t foo = 12345;

View File

@ -1,2 +1,3 @@
#include <stdint.h>
uint32_t add(uint32_t a, uint32_t b);
extern uint32_t foo;

View File

@ -6,3 +6,7 @@ test "C add" {
const result = c.add(1, 2);
expect(result == 3);
}
test "C extern variable" {
expect(c.foo == 12345);
}