Add FPC Compabulity
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<PackageName Value="FCL"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="3">
|
||||
<Units Count="4">
|
||||
<Unit0>
|
||||
<Filename Value="fpcunitproject1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@@ -50,9 +50,13 @@
|
||||
<UnitName Value="TestCase1"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="..\Source\Fasm4Delphi.pas"/>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="..\Fasm4Delphi\Source\Fasm4Delphi.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit3>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
@@ -60,11 +64,11 @@
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\Source"/>
|
||||
<OtherUnitFiles Value="..\Source;..\Fasm4Delphi\Source"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Exceptions Count="4">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
@@ -74,6 +78,9 @@
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Name Value="EOSError"/>
|
||||
</Item4>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
|
||||
@@ -4,37 +4,217 @@
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="3">
|
||||
<Units Count="11">
|
||||
<Unit0>
|
||||
<Filename Value="fpcunitproject1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="66" Y="6"/>
|
||||
<UsageCount Value="20"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="TestCase1"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="21"/>
|
||||
<CursorPos X="62" Y="41"/>
|
||||
<UsageCount Value="20"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="17"/>
|
||||
<CursorPos X="67" Y="29"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="..\Source\Fasm4Delphi.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="-1"/>
|
||||
<CursorPos X="-1" Y="-1"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="..\..\Source\FasmOnDelphi.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="-1"/>
|
||||
<CursorPos X="-1" Y="-1"/>
|
||||
<UsageCount Value="20"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="217"/>
|
||||
<CursorPos Y="234"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="..\Fasm4Delphi\Source\Fasm4Delphi.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<TopLine Value="16"/>
|
||||
<CursorPos X="3" Y="31"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="C:\lazarus\fpc\3.0.2\source\rtl\inc\varianth.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="484"/>
|
||||
<CursorPos X="12" Y="496"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="C:\lazarus\fpc\3.0.2\source\rtl\inc\wstringh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2"/>
|
||||
<CursorPos X="11" Y="19"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="C:\lazarus\fpc\3.0.2\source\rtl\inc\ustringh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2"/>
|
||||
<CursorPos X="11" Y="19"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="C:\lazarus\fpc\3.0.2\source\rtl\inc\systemh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1068"/>
|
||||
<CursorPos X="17" Y="1086"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="C:\lazarus\fpc\3.0.2\source\rtl\win\wininc\base.inc"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="140"/>
|
||||
<CursorPos X="6" Y="169"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
</Units>
|
||||
<General>
|
||||
<ActiveWindowIndexAtStart Value="-1"/>
|
||||
</General>
|
||||
<JumpHistory HistoryIndex="-1"/>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="33" TopLine="17"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="429" Column="56" TopLine="427"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="33" TopLine="17"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="185" Column="44" TopLine="170"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="33" TopLine="17"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="185" Column="35" TopLine="174"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="188" Column="24" TopLine="171"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="198" Column="20" TopLine="180"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="33" TopLine="17"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="549" TopLine="533"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="539" TopLine="533"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="33" TopLine="17"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="537" Column="8" TopLine="533"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="185" Column="56" TopLine="169"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="33" TopLine="17"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="23" Column="11" TopLine="17"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="174" Column="17" TopLine="157"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="217" Column="6" TopLine="201"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="621" Column="58" TopLine="599"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="355" Column="29" TopLine="336"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="217" Column="5" TopLine="194"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="226" Column="32" TopLine="205"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="27" TopLine="17"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="23" Column="60" TopLine="17"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="27" TopLine="17"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="234" TopLine="217"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="23" Column="59" TopLine="17"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="testcase1.pas"/>
|
||||
<Caret Line="29" Column="67" TopLine="17"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="234" TopLine="217"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="..\Source\FasmOnDelphi.pas"/>
|
||||
<Caret Line="539" TopLine="523"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
||||
BIN
FPCTests/test
Normal file
BIN
FPCTests/test
Normal file
Binary file not shown.
@@ -5,7 +5,7 @@ unit TestCase1;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, fpcunit, testutils, testregistry,Fasm4Delphi;
|
||||
Classes, SysUtils, fpcunit, testutils, testregistry,FasmOnDelphi;
|
||||
|
||||
type
|
||||
|
||||
@@ -16,36 +16,35 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
const
|
||||
CompliterMemSize=$10000;
|
||||
|
||||
var
|
||||
CompliterMem:PFASM_STATE;
|
||||
|
||||
procedure TTestCase1.TestHookUp;
|
||||
var
|
||||
Res:TFasmResult;
|
||||
begin
|
||||
if fasm_AssembleFile('..\Tests\Test1.asm',CompliterMem,CompliterMemSize)<>FASM_OK then
|
||||
Fail('Error in test1:'+sLineBreak+
|
||||
'Condition: '+CompliterMem^.condition.ToString+sLineBreak+
|
||||
'Error Code: '+CompliterMem^.error_code.ToString);
|
||||
if fasm_Assemble('add eax,0',CompliterMem,CompliterMemSize)<>FASM_OK then
|
||||
writeln('Error in test2:'+sLineBreak+
|
||||
'Condition: '+CompliterMem^.condition.ToString+sLineBreak+
|
||||
'Error Code: '+CompliterMem^.error_code.ToString);
|
||||
if fasm_AssembleFile('..\FasmDll\FASM.ASH',CompliterMem,CompliterMemSize)=FASM_OK then
|
||||
Fail('Error in test3:'+sLineBreak+
|
||||
'FASM is compiling something that it is can not compile at all.');
|
||||
if fasm_Assemble('call -100',CompliterMem,CompliterMemSize)<>FASM_OK then
|
||||
Fail('Error in test4:'+sLineBreak+
|
||||
'Condition: '+CompliterMem^.condition.ToString+sLineBreak+
|
||||
'Error Code: '+CompliterMem^.error_code.ToString);
|
||||
Res:=FasmAssembleFileToFile('..\Tests\Test1.ASM','..\Tests\Test1.bin');
|
||||
if Res.Error<>FASM_OK then
|
||||
Fail('Error in test1:'+sLineBreak+
|
||||
'Condition: '+Res.OutStr+sLineBreak+
|
||||
'Error Code: '+IntToStr(Res.Error)+sLineBreak);
|
||||
Res:=FasmAssemble('add eax,0');
|
||||
if Res.Error<>FASM_OK then
|
||||
Fail('Error in test2:'+sLineBreak+
|
||||
'Condition: '+Res.OutStr+sLineBreak+
|
||||
'Error Code: '+IntToStr(Res.Error)+sLineBreak);
|
||||
Res:=FasmAssembleFile('..\Fasm4Delphi\FasmDll\FASM.ASH');
|
||||
if Res.Error=FASM_OK then
|
||||
Fail('Error in test3:'+sLineBreak+
|
||||
'FASM is compiling something that it is can not compile at all.');
|
||||
Res:=FasmAssembleToFile('add eax,0','test');
|
||||
if Res.Error<>FASM_OK then
|
||||
Fail('Error in test4:'+sLineBreak+
|
||||
'Condition: '+Res.OutStr+sLineBreak+
|
||||
'Error Code:'+IntToStr(Res.Error)+sLineBreak);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
initialization
|
||||
LoadFASM('..\FasmDll\FASM.DLL');
|
||||
GetMem(CompliterMem,CompliterMemSize);
|
||||
OpenFASM('..\fasmw172\FASM.EXE');
|
||||
RegisterTest(TTestCase1);
|
||||
end.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user