mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-04 04:50:22 +00:00
Add tests of new .h file resolution
This commit is contained in:
parent
312e31ab0f
commit
68335187cf
|
@ -0,0 +1,6 @@
|
|||
|
||||
// Fake function for testing
|
||||
int Fast_Sqrt(int value)
|
||||
{
|
||||
return value * 2;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
$CONSOLE:ONLY
|
||||
|
||||
DECLARE LIBRARY "directory/fastmath"
|
||||
FUNCTION Fast_Sqrt&(BYVAL val AS LONG)
|
||||
END DECLARE
|
||||
|
||||
value = Fast_Sqrt&(2000)
|
||||
print value;
|
||||
SYSTEM
|
|
@ -0,0 +1 @@
|
|||
4000
|
|
@ -0,0 +1,11 @@
|
|||
$CONSOLE:ONLY
|
||||
|
||||
' This location is relative to the source file, not QB64-PE or the location
|
||||
' QB64-PE was run from.
|
||||
DECLARE LIBRARY "fastmath"
|
||||
FUNCTION Fast_Sqrt&(BYVAL val AS LONG)
|
||||
END DECLARE
|
||||
|
||||
value = Fast_Sqrt&(2000)
|
||||
print value;
|
||||
SYSTEM
|
|
@ -0,0 +1 @@
|
|||
4000
|
|
@ -0,0 +1,7 @@
|
|||
$CONSOLE:ONLY
|
||||
|
||||
'$include:'../extra/declare-header.bi'
|
||||
|
||||
value = Fast_Sqrt&(2000)
|
||||
print value;
|
||||
SYSTEM
|
|
@ -0,0 +1 @@
|
|||
4000
|
5
tests/compile_tests/extra/declare-header.bi
Normal file
5
tests/compile_tests/extra/declare-header.bi
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
DECLARE LIBRARY "./header-dir/fastmath-extra"
|
||||
FUNCTION Fast_Sqrt&(BYVAL val AS LONG)
|
||||
END DECLARE
|
||||
|
6
tests/compile_tests/extra/header-dir/fastmath-extra.h
Normal file
6
tests/compile_tests/extra/header-dir/fastmath-extra.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
// Fake function for testing
|
||||
int Fast_Sqrt(int value)
|
||||
{
|
||||
return value * 2;
|
||||
}
|
Loading…
Reference in a new issue