diff --git a/tests/tbs/tb0193.pp b/tests/tbs/tb0193.pp index 1ae3278354..8db261fd73 100644 --- a/tests/tbs/tb0193.pp +++ b/tests/tbs/tb0193.pp @@ -33,6 +33,16 @@ end; or %i0,%lo(stacksize),%i0 end; {$endif cpusparc} +{$ifdef cpuarm} + ldr r0,.Lpstacksize + ldr r0,[r0] + b .Lend +.Lpstacksize: + .long stacksize +.Lend: +end; +{$endif cpuarm} + begin writeln(getstacksize); end. diff --git a/tests/tbs/tb0206.pp b/tests/tbs/tb0206.pp index 97a5fda104..72c7f51075 100644 --- a/tests/tbs/tb0206.pp +++ b/tests/tbs/tb0206.pp @@ -7,7 +7,11 @@ const procedure test_const(const s : string;const x); begin +{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT} + writeln(s,' is ',longint(unaligned(x))); +{$else} writeln(s,' is ',longint(x)); +{$endif} end; procedure change(var x); diff --git a/tests/test/cg/tprintf.pp b/tests/test/cg/tprintf.pp index f422e291f6..5ef656c9be 100644 --- a/tests/test/cg/tprintf.pp +++ b/tests/test/cg/tprintf.pp @@ -6,10 +6,17 @@ uses strings; -{$ifdef win32} +{$if defined(win32) or defined(wince)} +const +{$ifdef wince} + CrtLib = 'coredll.dll'; +{$else} + CrtLib = 'coredll.dll'; +{$endif} + { $linklib msvcrt} -procedure printf(const formatstr : pchar; const args : array of const);cdecl; external 'msvcrt.dll' name 'printf'; -procedure sprintf(p : pchar;const formatstr : pchar; const args : array of const);cdecl; external 'msvcrt.dll' name 'sprintf'; +procedure printf(const formatstr : pchar; const args : array of const);cdecl; external CrtLib name 'printf'; +procedure sprintf(p : pchar;const formatstr : pchar; const args : array of const);cdecl; external CrtLib name 'sprintf'; const int64prefix='I64'; {$else} diff --git a/tests/test/units/dos/tdos2.pp b/tests/test/units/dos/tdos2.pp index 45817b218a..b04d3e3cf1 100644 --- a/tests/test/units/dos/tdos2.pp +++ b/tests/test/units/dos/tdos2.pp @@ -39,6 +39,9 @@ Uses Dos; {$IFDEF ATARI} {$DEFINE EXTATTR} {$ENDIF} +{$IFDEF WINCE} + {$DEFINE EXTATTR} +{$ENDIF} @@ -65,11 +68,14 @@ Uses Dos; CONST { what is the root path } -{$IFDEF EXTATTR} - RootPath = 'C:\'; -{$ENDIF} -{$IFDEF UNIX} +{$ifdef UNIX} RootPath = '/'; +{$else UNIX} + {$ifdef WINCE} + RootPath = '\'; + {$else WINCE} + RootPath = 'C:\'; + {$endif WINCE} {$ENDIF} Week:Array[0..6] of String = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); @@ -527,12 +533,14 @@ Begin if not FoundDir then WriteLn(s+'FAILURE. Did not find '+TestDir+' directory') else +{$ifndef wince} if not FoundDot then WriteLn(s+'FAILURE. Did not find special ''''.'''' directory') else if not FoundDotDot then WriteLn(s+'FAILURE. Did not find special ''''..'''' directory') else +{$endif wince} if Failure then WriteLn(s+'FAILURE. Did not find special '+TestFName1+' directory') else diff --git a/tests/test/units/dos/tfattr.pp b/tests/test/units/dos/tfattr.pp index 07b2184e5b..0a3e4f126d 100644 --- a/tests/test/units/dos/tfattr.pp +++ b/tests/test/units/dos/tfattr.pp @@ -28,15 +28,21 @@ uses dos; {$IFDEF ATARI} {$DEFINE EXTATTR} {$ENDIF} +{$IFDEF WINCE} + {$DEFINE EXTATTR} +{$ENDIF} CONST { what is the root path } -{$IFDEF EXTATTR} - RootPath = 'C:\'; -{$ENDIF} -{$IFDEF UNIX} +{$ifdef UNIX} RootPath = '/'; +{$else UNIX} + {$ifdef WINCE} + RootPath = '\'; + {$else WINCE} + RootPath = 'C:\'; + {$endif WINCE} {$ENDIF} Week:Array[0..6] of String = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); @@ -99,6 +105,7 @@ Begin WriteLn('Trying to open a valid file...Success!'); GetFAttr(f,Attr); CheckDosError(0); +{$ifndef wince} Write('Trying to open the current directory file...'); Assign(f,'.'); GetFAttr(f,Attr); @@ -115,6 +122,7 @@ Begin else WriteLn('Success!'); CheckDosError(0); +{$endif wince} { This is completely platform dependent Write('Trying to open the parent directory file when in root...'); Getdir(0,s); @@ -136,7 +144,11 @@ Begin {$endif} Write('Trying to open a directory file...'); +{$ifdef wince} + s:='\windows'; +{$else} GetDir(0,s); +{$endif wince} Assign(f,s); GetFAttr(f, Attr); if (attr and Directory) = 0 then diff --git a/tests/webtbs/tw1255.pp b/tests/webtbs/tw1255.pp index 81afa68d33..7eec41294a 100644 --- a/tests/webtbs/tw1255.pp +++ b/tests/webtbs/tw1255.pp @@ -22,6 +22,10 @@ begin {$ifdef UNIX} testff('/etc/host*'); {$else} - testff('c:\autoexec.*'); + {$ifdef wince} + testff('\windows\calc.*'); + {$else} + testff('c:\autoexec.*'); + {$endif wince} {$endif} end.