* wince support for some tests.

git-svn-id: trunk@4111 -
This commit is contained in:
yury 2006-07-06 19:09:42 +00:00
parent f96b571e38
commit 291b00529a
6 changed files with 57 additions and 12 deletions

View File

@ -33,6 +33,16 @@ end;
or %i0,%lo(stacksize),%i0 or %i0,%lo(stacksize),%i0
end; end;
{$endif cpusparc} {$endif cpusparc}
{$ifdef cpuarm}
ldr r0,.Lpstacksize
ldr r0,[r0]
b .Lend
.Lpstacksize:
.long stacksize
.Lend:
end;
{$endif cpuarm}
begin begin
writeln(getstacksize); writeln(getstacksize);
end. end.

View File

@ -7,7 +7,11 @@ const
procedure test_const(const s : string;const x); procedure test_const(const s : string;const x);
begin begin
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
writeln(s,' is ',longint(unaligned(x)));
{$else}
writeln(s,' is ',longint(x)); writeln(s,' is ',longint(x));
{$endif}
end; end;
procedure change(var x); procedure change(var x);

View File

@ -6,10 +6,17 @@
uses uses
strings; strings;
{$ifdef win32} {$if defined(win32) or defined(wince)}
const
{$ifdef wince}
CrtLib = 'coredll.dll';
{$else}
CrtLib = 'coredll.dll';
{$endif}
{ $linklib msvcrt} { $linklib msvcrt}
procedure printf(const formatstr : pchar; const args : array of const);cdecl; external 'msvcrt.dll' name 'printf'; 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 'msvcrt.dll' name 'sprintf'; procedure sprintf(p : pchar;const formatstr : pchar; const args : array of const);cdecl; external CrtLib name 'sprintf';
const const
int64prefix='I64'; int64prefix='I64';
{$else} {$else}

View File

@ -39,6 +39,9 @@ Uses Dos;
{$IFDEF ATARI} {$IFDEF ATARI}
{$DEFINE EXTATTR} {$DEFINE EXTATTR}
{$ENDIF} {$ENDIF}
{$IFDEF WINCE}
{$DEFINE EXTATTR}
{$ENDIF}
@ -65,11 +68,14 @@ Uses Dos;
CONST CONST
{ what is the root path } { what is the root path }
{$IFDEF EXTATTR} {$ifdef UNIX}
RootPath = 'C:\';
{$ENDIF}
{$IFDEF UNIX}
RootPath = '/'; RootPath = '/';
{$else UNIX}
{$ifdef WINCE}
RootPath = '\';
{$else WINCE}
RootPath = 'C:\';
{$endif WINCE}
{$ENDIF} {$ENDIF}
Week:Array[0..6] of String = Week:Array[0..6] of String =
('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
@ -527,12 +533,14 @@ Begin
if not FoundDir then if not FoundDir then
WriteLn(s+'FAILURE. Did not find '+TestDir+' directory') WriteLn(s+'FAILURE. Did not find '+TestDir+' directory')
else else
{$ifndef wince}
if not FoundDot then if not FoundDot then
WriteLn(s+'FAILURE. Did not find special ''''.'''' directory') WriteLn(s+'FAILURE. Did not find special ''''.'''' directory')
else else
if not FoundDotDot then if not FoundDotDot then
WriteLn(s+'FAILURE. Did not find special ''''..'''' directory') WriteLn(s+'FAILURE. Did not find special ''''..'''' directory')
else else
{$endif wince}
if Failure then if Failure then
WriteLn(s+'FAILURE. Did not find special '+TestFName1+' directory') WriteLn(s+'FAILURE. Did not find special '+TestFName1+' directory')
else else

View File

@ -28,15 +28,21 @@ uses dos;
{$IFDEF ATARI} {$IFDEF ATARI}
{$DEFINE EXTATTR} {$DEFINE EXTATTR}
{$ENDIF} {$ENDIF}
{$IFDEF WINCE}
{$DEFINE EXTATTR}
{$ENDIF}
CONST CONST
{ what is the root path } { what is the root path }
{$IFDEF EXTATTR} {$ifdef UNIX}
RootPath = 'C:\';
{$ENDIF}
{$IFDEF UNIX}
RootPath = '/'; RootPath = '/';
{$else UNIX}
{$ifdef WINCE}
RootPath = '\';
{$else WINCE}
RootPath = 'C:\';
{$endif WINCE}
{$ENDIF} {$ENDIF}
Week:Array[0..6] of String = Week:Array[0..6] of String =
('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
@ -99,6 +105,7 @@ Begin
WriteLn('Trying to open a valid file...Success!'); WriteLn('Trying to open a valid file...Success!');
GetFAttr(f,Attr); GetFAttr(f,Attr);
CheckDosError(0); CheckDosError(0);
{$ifndef wince}
Write('Trying to open the current directory file...'); Write('Trying to open the current directory file...');
Assign(f,'.'); Assign(f,'.');
GetFAttr(f,Attr); GetFAttr(f,Attr);
@ -115,6 +122,7 @@ Begin
else else
WriteLn('Success!'); WriteLn('Success!');
CheckDosError(0); CheckDosError(0);
{$endif wince}
{ This is completely platform dependent { This is completely platform dependent
Write('Trying to open the parent directory file when in root...'); Write('Trying to open the parent directory file when in root...');
Getdir(0,s); Getdir(0,s);
@ -136,7 +144,11 @@ Begin
{$endif} {$endif}
Write('Trying to open a directory file...'); Write('Trying to open a directory file...');
{$ifdef wince}
s:='\windows';
{$else}
GetDir(0,s); GetDir(0,s);
{$endif wince}
Assign(f,s); Assign(f,s);
GetFAttr(f, Attr); GetFAttr(f, Attr);
if (attr and Directory) = 0 then if (attr and Directory) = 0 then

View File

@ -22,6 +22,10 @@ begin
{$ifdef UNIX} {$ifdef UNIX}
testff('/etc/host*'); testff('/etc/host*');
{$else} {$else}
testff('c:\autoexec.*'); {$ifdef wince}
testff('\windows\calc.*');
{$else}
testff('c:\autoexec.*');
{$endif wince}
{$endif} {$endif}
end. end.