* 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
end;
{$endif cpusparc}
{$ifdef cpuarm}
ldr r0,.Lpstacksize
ldr r0,[r0]
b .Lend
.Lpstacksize:
.long stacksize
.Lend:
end;
{$endif cpuarm}
begin
writeln(getstacksize);
end.

View File

@ -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);

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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.