]> gitweb.factorcode.org Git - factor.git/blob - basis/alien/libraries/libraries-tests.factor
factor: Make source files/resources 644 instead of 755.
[factor.git] / basis / alien / libraries / libraries-tests.factor
1 USING: accessors alien alien.libraries alien.syntax kernel tools.test ;
2 IN: alien.libraries.tests
3
4 { f } [ DLL" fadfasdfsada" dll-valid? ] unit-test
5
6 { f } [ "does not exist" DLL" fadsfasfdsaf" dlsym ] unit-test
7
8 { } [ "doesnotexist" dlopen dlclose ] unit-test
9
10 [ "fdasfsf" dll-valid? drop ] must-fail
11
12 { t } [
13     "test-library" "blah" cdecl add-library
14     "test-library" "BLAH" cdecl add-library?
15     "blah" remove-library
16 ] unit-test
17
18 { t } [
19     "test-library" "blah" cdecl add-library
20     "test-library" "blah" stdcall add-library?
21     "blah" remove-library
22 ] unit-test
23
24 { f } [
25     "test-library" "blah" cdecl add-library
26     "test-library" "blah" cdecl add-library?
27     "blah" remove-library
28 ] unit-test
29
30 { "blah" f } [
31     "blah" cdecl make-library [ path>> ] [ dll>> dll-valid? ] bi
32 ] unit-test
33
34 ! dlsym?
35 { t } [
36     "err_no" "factor" dlsym? alien?
37 ] unit-test