mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-28 05:32:03 +03:00
fix execution of network test to correctly load library
This commit is contained in:
parent
f6b746e7ac
commit
75459e7fca
@ -5,7 +5,7 @@ import Network.Socket
|
||||
import Network.Socket.Data
|
||||
import Network.Socket.Raw
|
||||
|
||||
%cg chez libidris_net.dylib
|
||||
%cg chez libidris_net
|
||||
|
||||
runServer : IO (Either String (Port, ThreadID))
|
||||
runServer = do
|
||||
|
@ -55,9 +55,9 @@ clean :
|
||||
rm -rf $(OBJS) $(LIBTARGET) $(DYLIBTARGET) build
|
||||
|
||||
test: build test.c
|
||||
LD_LIBRARY_PATH=. $(CC) -o network-tests -L. -I. -l$(LIBNAME) test.c
|
||||
./network-tests
|
||||
./lib-tests
|
||||
$(CC) -o network-tests -L. -I. -l$(LIBNAME) test.c
|
||||
LD_LIBRARY_PATH=. ./network-tests
|
||||
LD_LIBRARY_PATH=. ./lib-tests
|
||||
|
||||
$(OBJS): $(HDRS)
|
||||
|
||||
|
@ -5,12 +5,6 @@
|
||||
|
||||
#include "idris_net.h"
|
||||
|
||||
void test_eagain() {
|
||||
int eagain = idrnet_geteagain();
|
||||
assert(eagain == 35);
|
||||
}
|
||||
|
||||
|
||||
void test_sockaddr_port_returns_random_port_when_bind_port_is_0() {
|
||||
int sock = idrnet_socket(AF_INET, 1, 0);
|
||||
assert(sock > 0);
|
||||
@ -39,7 +33,6 @@ void test_sockaddr_port_returns_explicitly_assigned_port() {
|
||||
|
||||
|
||||
int main(int argc, char**argv) {
|
||||
test_eagain();
|
||||
test_sockaddr_port_returns_explicitly_assigned_port();
|
||||
test_sockaddr_port_returns_random_port_when_bind_port_is_0();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user