aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-11-07 15:26:44 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:49 +0100
commit3260749d369d3466c345d40a8b2189c32c8c1b60 (patch)
treebdf235d333e6b4d0b0edb11bde421617a180ff92 /test
parentde5a3593ae7bc6fb5aab9d76d01d3faa47b91bba (diff)
downloadusdx-3260749d369d3466c345d40a8b2189c32c8c1b60.tar.gz
usdx-3260749d369d3466c345d40a8b2189c32c8c1b60.tar.xz
usdx-3260749d369d3466c345d40a8b2189c32c8c1b60.zip
removed pascal code
Diffstat (limited to 'test')
-rw-r--r--test/test001.pas86
-rw-r--r--test/testsqllite.pas84
2 files changed, 0 insertions, 170 deletions
diff --git a/test/test001.pas b/test/test001.pas
deleted file mode 100644
index c9ba266f..00000000
--- a/test/test001.pas
+++ /dev/null
@@ -1,86 +0,0 @@
-program test001;
-
-{
-This program tests the function glext_ExtensionSupported from unit glext.
-}
-
-uses
- SysUtils,
- SDL in '../src/lib/JEDI-SDL/SDL/Pas/sdl.pas',
- moduleloader in '../src/lib/JEDI-SDL/SDL/Pas/moduleloader.pas',
- gl in '../src/lib/JEDI-SDL/OpenGL/Pas/gl.pas',
- glext in '../src/lib/JEDI-SDL/OpenGL/Pas/glext.pas';
-
-const
- s1: pchar = '';
- s2: pchar = 'ext';
- s3: pchar = ' ext';
- s4: pchar = ' ext ';
- s5: pchar = 'kkshf kjsfh ext';
- s6: pchar = 'fakh sajhf ext jskdhf';
- s7: pchar = 'ext jshf';
- s8: pchar = 'sdkjfh ksjhext sjdha';
- s9: pchar = 'sdkjfh ksjh extsjdha';
- s10: pchar = 'sdkjfh ksjhextsjdha';
- s11: pchar = 'sd kjf jdha';
-
- e1: pchar = '';
- e2: pchar = 'ext';
- e3: pchar = 'GL_ARB_window_pos';
-
- SCREEN_WIDTH = 640;
- SCREEN_HEIGHT = 480;
- SCREEN_BPP = 16;
-
-var
- surface: PSDL_Surface;
- videoFlags: integer;
- testFailed: boolean;
-
-procedure treatTestFailure(testNumber: integer, var testFailed: boolean);
-begin
- writeln;
- write ('test001, ', testNumber, ': failed');
- testFailed := true;
-end;
-
-begin
- write ('test001: Start ... ');
- testFailed := false;
-
-// initialize SDL and OpenGL for the use of glGetString(GL_EXTENSIONS)
-// within glext_ExtensionSupported.
-
- SDL_Init( SDL_INIT_VIDEO);
-
-// the flags to pass to SDL_SetVideoMode
- videoFlags := SDL_OPENGL;
-
-// get a SDL surface
- surface := SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, videoFlags);
-
-// Initialization finished
-
- if glext_ExtensionSupported(e1, s1) then treatTestFailure( 1, testFailed);
- if glext_ExtensionSupported(e1, s2) then treatTestFailure( 2, testFailed);
- if glext_ExtensionSupported(e2, s1) then treatTestFailure( 3, testFailed);
- if not glext_ExtensionSupported(e2, s2) then treatTestFailure( 4, testFailed);
- if not glext_ExtensionSupported(e2, s3) then treatTestFailure( 5, testFailed);
- if not glext_ExtensionSupported(e2, s4) then treatTestFailure( 6, testFailed);
- if not glext_ExtensionSupported(e2, s5) then treatTestFailure( 7, testFailed);
- if not glext_ExtensionSupported(e2, s6) then treatTestFailure( 8, testFailed);
- if not glext_ExtensionSupported(e2, s7) then treatTestFailure( 9, testFailed);
- if glext_ExtensionSupported(e2, s8) then treatTestFailure(10, testFailed);
- if glext_ExtensionSupported(e2, s9) then treatTestFailure(11, testFailed);
- if glext_ExtensionSupported(e2, s10) then treatTestFailure(12, testFailed);
- if glext_ExtensionSupported(e2, s11) then treatTestFailure(13, testFailed);
- if not glext_ExtensionSupported(e3, s1) then treatTestFailure(14, testFailed);
-
- if testFailed then
- begin
- writeln;
- writeln ('test001: End');
- end
- else
- writeln ('End');
-end. \ No newline at end of file
diff --git a/test/testsqllite.pas b/test/testsqllite.pas
deleted file mode 100644
index b1b682d2..00000000
--- a/test/testsqllite.pas
+++ /dev/null
@@ -1,84 +0,0 @@
-unit TestSQLLite;
-
-{$mode objfpc}{$H+}
-
-interface
-
-uses
- Classes, SysUtils, fpcunit, testutils, testregistry, SQLiteTable3, unix;
-
-type
-
- TTest_SqlLite= class(TTestCase)
- private
- fSQLLite : TSQLiteDatabase;
- fFileName : string;
- protected
- procedure SetUp; override;
- procedure TearDown; override;
- published
- procedure Test_Random_TableExists;
- procedure Test_Delete_NonExistant_Table;
- procedure Test_TableExists_On_0Length_File;
- end;
-
-implementation
-
-procedure TTest_SqlLite.Test_Random_TableExists;
-begin
- deletefile( fFileName );
- fSQLLite := TSQLiteDatabase.Create( fFileName );
-
- // Test if some random table exists
- check( not fSQLLite.TableExists( 'testTable'+floattostr(now()) ) , 'Randomly Named Table Should NOT Exists (In an empty database file)' );
-end;
-
-procedure TTest_SqlLite.Test_Delete_NonExistant_Table;
-var
- lSQL : String;
-begin
- deletefile( fFileName );
- fSQLLite := TSQLiteDatabase.Create( fFileName );
- try
- lSQL := 'DROP TABLE testtable';
- fSQLLite.execsql( lSQL );
- except
- exit;
- end;
-
- Fail('SQLLite did not except when trying to delete a non existant table' );
-end;
-
-procedure TTest_SqlLite.Test_TableExists_On_0Length_File;
-var
- lSQL : String;
-begin
- deletefile( fFileName );
- shell('cat /dev/null > '+fFileName);
-
- if not fileexists( fFileName ) then
- Fail('0 Length file was not created... oops' );
-
- fSQLLite := TSQLiteDatabase.Create( fFileName );
-
- check( not fSQLLite.TableExists( 'testTable' ) , 'Randomly Named Table Should NOT Exists' );
-end;
-
-
-procedure TTest_SqlLite.SetUp;
-begin
- fFileName := 'test.db';
-// fSQLLite := TSQLiteDatabase.Create( fFileName );
-end;
-
-
-procedure TTest_SqlLite.TearDown;
-begin
- freeandnil( fSQLLite );
-end;
-
-initialization
-
- RegisterTest(TTest_SqlLite);
-end.
-