Browse Source

* removed tests, moving them to integrated testsuite.

git-svn-id: trunk@19306 -
marco 14 years ago
parent
commit
64c8cebac2
3 changed files with 0 additions and 161 deletions
  1. 0 2
      .gitattributes
  2. 0 74
      packages/fcl-db/tests/test100params.pp
  3. 0 85
      packages/fcl-db/tests/testwherenull.lpr

+ 0 - 2
.gitattributes

@@ -1994,7 +1994,6 @@ packages/fcl-db/tests/sqldbtoolsunit.pas svneol=native#text/plain
 packages/fcl-db/tests/tcgensql.pas svneol=native#text/plain
 packages/fcl-db/tests/tcparser.pas svneol=native#text/plain
 packages/fcl-db/tests/tcsqlscanner.pas svneol=native#text/plain
-packages/fcl-db/tests/test100params.pp svneol=native#text/plain
 packages/fcl-db/tests/testbasics.pas svneol=native#text/plain
 packages/fcl-db/tests/testbufdatasetstreams.pas svneol=native#text/plain
 packages/fcl-db/tests/testdatasources.pas svneol=native#text/plain
@@ -2006,7 +2005,6 @@ packages/fcl-db/tests/testsqlfiles.lpr svneol=native#text/plain
 packages/fcl-db/tests/testsqlscanner.lpi svneol=native#text/plain
 packages/fcl-db/tests/testsqlscanner.lpr svneol=native#text/plain
 packages/fcl-db/tests/testsqlscript.pas svneol=native#text/plain
-packages/fcl-db/tests/testwherenull.lpr svneol=native#text/plain
 packages/fcl-db/tests/toolsunit.pas svneol=native#text/plain
 packages/fcl-db/tests/xmlxsdexporttestcase1.pas svneol=native#text/plain
 packages/fcl-extra/Makefile svneol=native#text/plain

+ 0 - 74
packages/fcl-db/tests/test100params.pp

@@ -1,74 +0,0 @@
-program test100params;
-
-{$mode objfpc}{$H+}
-
-uses
-  {$IFDEF UNIX}{$IFDEF UseCThreads}
-  cthreads,
-  {$ENDIF}{$ENDIF}
-  Classes, SysUtils,
-  db, sqldb, pqconnection;
-
-var
-  Conn: TPQConnection;
-  Tran: TSQLTransaction;
-  Q: TSQLQuery;
-
-  sql: string;
-  i: integer;
-
-begin
-  Conn:=TPQConnection.Create(nil);
-  Conn.HostName:='localhost';
-  Conn.DatabaseName:='postgres';
-  Conn.UserName:='postgres';
-  Conn.Password:='postgres';
-
-  Tran:=TSQLTransaction.Create(nil);
-  Tran.DataBase:=Conn;
-
-  Q:=TSQLQuery.Create(nil);
-  Q.DataBase:=Conn;
-
-  Conn.Open;
-  writeln('Connected');
-
-  sql:='';
-  for i:=1 to 101 do
-  begin
-    if sql<>'' then sql:=sql+',';
-    sql:=sql+format('f%d integer', [i]);
-  end;
-  Conn.ExecuteDirect(format('CREATE TEMPORARY TABLE t (%s)', [sql]));
-  writeln('Table created');
-
-  sql:='';
-  for i:=1 to 101 do
-  begin
-    if sql<>'' then sql:=sql+',';
-    sql:=sql+format(':f%d', [i]);
-  end;
-  Q.SQL.Text:=format('INSERT INTO t VALUES(%s)', [sql]);
-  for i:=1 to 101 do
-  begin
-    Q.ParamByName('f'+inttostr(i)).AsInteger:=i;
-  end;
-  Q.ExecSQL;
-
-  Q.SQL.Text:='SELECT * FROM t';
-  Q.Open;
-  for i:=90 to 101 do
-    writeln(Q.FieldByName('f'+inttostr(i)).AsInteger, ',');
-  Q.Close;
-
-  //END
-  Tran.Commit;
-  Conn.Close;
-
-  Q.Free;
-  Tran.Free;
-  Conn.Free;
-  writeln('End. Press any key');
-  readln;
-end.
-

+ 0 - 85
packages/fcl-db/tests/testwherenull.lpr

@@ -1,85 +0,0 @@
-program testWhereNULL;
-
-{$mode objfpc}{$H+}
-
-uses
-  {$IFDEF UNIX}{$IFDEF UseCThreads}
-  cthreads,
-  {$ENDIF}{$ENDIF}
-  Classes, SysUtils,
-  db, sqldb, sqlite3conn, variants;
-
-
-var
-  Conn: TSQLite3Connection;
-  Tran: TSQLTransaction;
-  Q: TSQLQuery;
-
-  sql: string;
-  i: integer;
-
-begin
-  Conn:=TSQLite3Connection.Create(nil);
-  Conn.DatabaseName:='test.db';
-
-  Tran:=TSQLTransaction.Create(nil);
-  Tran.DataBase:=Conn;
-
-  Q:=TSQLQuery.Create(nil);
-  Q.DataBase:=Conn;
-
-  Conn.Open;
-  writeln('Connected');
-
-  Conn.ExecuteDirect('CREATE TEMPORARY TABLE t (int_field INT, string_field VARCHAR(30))');
-  writeln('Temporary table created');
-
-  Q.SQL.Text:='SELECT * FROM t';
-  Q.UpdateMode:=upWhereAll; // <-- UpdateMode is upWhereAll or upWhereCahnged
-  Q.Open;
-  Q.AppendRecord([NULL,'a']);
-  Q.AppendRecord([2,'c']);
-  Q.ApplyUpdates;
-  Q.Close;
-
-  writeln('1. Bug: second row has instead of 2 in first column NULL');
-  Q.Open;
-  Q.Next;
-  writeln('Value of ', Q.Fields[0].FieldName,' is: ', Q.Fields[0].AsString, ' expected: 2');
-  Q.Close;
-
-  writeln;
-  writeln('2. Case update of record, where some value is null (upWhereAll or upWhereChanged)');
-  Q.Open;
-  Q.Edit;
-  Q.Fields[1].AsString:='b';
-  Q.Post;
-  Q.ApplyUpdates;
-  Q.Close;
-
-  Q.Open;
-  writeln('Value of ', Q.Fields[1].FieldName,' is: ', Q.Fields[1].AsString,' expected: b');
-  Q.Close;
-
-  writeln;
-  writeln('3. Case delete of record, where some value is null (upWhereAll or upWhereChanged)');
-  Q.Open;
-  Q.Delete;
-  Q.ApplyUpdates;
-  Q.Close;
-
-  Q.Open;
-  writeln('Number of rows: ', Q.RecordCount, ' expected: 1');
-  Q.Close;
-
-  //END
-  Tran.Commit;
-  Conn.Close;
-
-  Q.Free;
-  Tran.Free;
-  Conn.Free;
-  writeln('End. Press any key');
-  readln;
-end.
-