aboutsummaryrefslogtreecommitdiffstats
path: root/src/unit-tests/testsqllite.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-01 17:01:58 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-01 17:01:58 +0000
commit2ab22bdad1415813a3e1df329640332702272fc0 (patch)
tree380c56fb3840936848b1c2a44ef8509b1f23b33c /src/unit-tests/testsqllite.pas
parent2cfc26881d21532cb9cb456800d0b1738e183fe0 (diff)
downloadusdx-2ab22bdad1415813a3e1df329640332702272fc0.tar.gz
usdx-2ab22bdad1415813a3e1df329640332702272fc0.tar.xz
usdx-2ab22bdad1415813a3e1df329640332702272fc0.zip
- new configure/make layout:
- configure/main-makefile moved to root-dir - configure-script checked in (no need to call autogen.sh on first run) - autogen.sh, m4, install.sh etc. moved to dists/autogen/ - config.guess/sub for canonical builds - unit-tests moved to test - removed delphi subdir in portaudio/-mixer - COPYING.txt/AUTHORS.txt/... added - dists/delphi7/2005 added git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1334 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/unit-tests/testsqllite.pas')
-rw-r--r--src/unit-tests/testsqllite.pas84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/unit-tests/testsqllite.pas b/src/unit-tests/testsqllite.pas
deleted file mode 100644
index b1b682d2..00000000
--- a/src/unit-tests/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.
-