--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <allParam.h>
+
+#include "i_conparam.h"
+
+int i_conparam(const char *testid) {
+ Param *param;
+ char *name = "tname";
+ char *idx = "tint";
+ unsigned long int result;
+ int rows;
+ int retVal;
+ int myRetVal;
+
+#ifdef VERBOSE
+ printf("%s : Param_getInt: Lowercase input on correct statements.\n", testid);
+#endif
+
+ param = malloc(sizeof(Param));
+ conParam(param);
+
+ retVal = Param_getInt(param, name, idx, &rows, &result);
+ if ((rows == 1) && (result == 100) && (retVal == 0)) {
+ myRetVal = 0;
+ printf("%s : Passed.\n", testid);
+ } else {
+#ifdef VERBOSE
+ printf("%s : Failed. Rows: %d, result: \'%ld\', return Value: %d.\n", testid, rows, result, retVal);
+ printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
+#else
+ printf("%s : Failed.\n", testid);
+#endif
+ myRetVal = -1;
+ }
+ desParam(param);
+ free(param);
+
+ return myRetVal;
+}
+
--- /dev/null
+#ifndef I_CONPARAM_H
+#define I_CONPARAM_H
+
+int i_conparam(const char *);
+
+#endif
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getInt(param, name, idx, &rows, &result);
if ((rows == 1) && (result == 100) && (retVal == 0)) {
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getInt(param, name, idx, &rows, &result);
if ((rows == 0) && (retVal == 0)) {
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <allParam.h>
+
+#include "i_no_setup.h"
+
+int i_no_setup(const char *testid) {
+ Param *param;
+ char *name = "tname";
+ char *idx = "tint";
+ unsigned long int result;
+ int rows;
+ int retVal;
+ int myRetVal;
+
+#ifdef VERBOSE
+ printf("%s : Param_getInt: Lowercase input on correct statements.\n", testid);
+#endif
+
+ param = malloc(sizeof(Param));
+ conSetupParam(param, NULL);
+
+ retVal = Param_getInt(param, name, idx, &rows, &result);
+ if ((rows == 1) && (result == 100) && (retVal == 0)) {
+ myRetVal = 0;
+ printf("%s : Passed.\n", testid);
+ } else {
+#ifdef VERBOSE
+ printf("%s : Failed. Rows: %d, result: \'%ld\', return Value: %d.\n", testid, rows, result, retVal);
+ printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
+#else
+ printf("%s : Failed.\n", testid);
+#endif
+ myRetVal = -1;
+ }
+ desParam(param);
+ free(param);
+
+ return myRetVal;
+}
+
--- /dev/null
+#ifndef I_NO_SETUP_H
+#define I_NO_SETUP_H
+
+int i_no_setup(const char *);
+
+#endif
printf("%s : Param_storeInt: Simple.\n", testid);
#endif
- truncate("storage.tcl", 0);
+ truncate("i_store_s.tcl", 0);
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, "i_store");
retVal1 = Param_storeInt(param, name, idx, tostore);
retVal2 = Param_getInt(param, name, idx, &rows, &result);
free(param);
if ((rows == 1) && result && (result == tostore) && (retVal1 == 0) && (retVal2 == 0)) {
- if(system("diff storage.tcl i_store.tcl")) {
+ if(system("diff i_store_s.tcl i_store.tcl")) {
#ifdef VERBOSE
- printf("%s : Failed: Files \"storage.tcl\" and \"i_store.tcl\" differ.\n", testid);
+ printf("%s : Failed: Files \"%s_s.tcl\" and \"%s.tcl\" differ.\n", testid, testid, testid);
printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
#else
printf("%s : Failed.\n", testid);
printf("%s : Param_storeInt: Store a Parameter already existing in the source.\n", testid);
#endif
- truncate("storage.tcl", 0);
+ truncate("s_store_existing_s.tcl", 0);
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal1 = Param_storeInt(param, name, idx, tostore);
retVal2 = Param_getInt(param, name, idx, &rows, &result);
free(param);
if ((rows == 1) && result && (result == tostore) && (retVal1 == 0) && (retVal2 == 0)) {
- if(system("diff storage.tcl i_store_existing.tcl")) {
+ if(system("diff i_store_existing_s.tcl i_store_existing.tcl")) {
#ifdef VERBOSE
- printf("%s : Failed: Files \"storage.tcl\" and \"i_store_existing.tcl\" differ.\n", testid);
+ printf("%s : Failed: Files \"%s_s.tcl\" and \"%s.tcl\" differ.\n", testid, testid, testid);
printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
#else
printf("%s : Failed.\n", testid);
printf("%s : Param_storeInt: Storing a value multiple.\n", testid);
#endif
- truncate("storage.tcl", 0);
+ truncate("i_store_multiple_s.tcl", 0);
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal1 = Param_storeInt(param, name, idx, old);
retVal2 = Param_storeInt(param, name, idx, new);
free(param);
if ((rows == 1) && result && (result == new) && (retVal1 == 0) && (retVal2 == 0) && (retVal3 == 0)) {
- if(system("diff storage.tcl i_store_multiple.tcl")) {
+ if(system("diff i_store_multiple_s.tcl i_store_multiple.tcl")) {
#ifdef VERBOSE
- printf("%s : Failed: Files \"storage.tcl\" and \"i_store_multiple.tcl\" differ.\n", testid);
+ printf("%s : Failed: Files \"%s_s.tcl\" and \"%s.tcl\" differ.\n", testid, testid, testid);
printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
#else
printf("%s : Failed.\n", testid);
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getInt(param, name, idx, &rows, &result);
- if ((rows == 0) && (retVal == -1)) {
+ if ((rows == 0) && ((retVal == -1) || (retVal == 0))) {
myRetVal = 0;
printf("%s : Passed.\n", testid);
} else {
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getInt(param, name, idx, &rows, &result);
if ((rows == 1) && (result == 100) && (retVal == 0)) {
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getIntArray(param, name, idx, NUM6, &rows, result);
for(i = 0 ; i < NUM6 ; i++) {
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
for(i = 0 ; i < NUM2 ; i++) {
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
if ((rows == 0) && (retVal == 0)) {
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getIntArray(param, name, idx, NUM4, &rows, result);
for(i = 0 ; i < NUM2 ; i++) {
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getIntArray(param, name, idx, NUM1, &rows, result);
if ((rows == 0) && (retVal == -1)) {
#endif
param = malloc(sizeof(Param));
- conParam(param);
+ conSetupParam(param, testid);
retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
for(i = 0 ; i < NUM2 ; i++) {
+++ /dev/null
-set file(rname) test0.blob
-set file(aname) /test0.blob
-set file(rnamellarge) test1.blob
-set file(rnameodd) test2.blob
-
-set file(namea0) test1.blob
-set file(namea1) /test0.blob
-set file(namea2) test3.blob
-set file(namea3) /test2.blob
-set file(namea4) test5.blob
-set file(namea5) /test4.blob
-set file(namea6) test7.blob
-set file(namea7) /test6.blob
-set file(namea9) test10.blob
-
-set tname(twhitespace) "test1000 whith whitespace"
-set tname(tstring) test1000
-
-set tname(tint) 1000
-
-set tname(tstringa0) test10
-set tname(tstringa1) test00
-set tname(tstringa2) test30
-set tname(tstringa3) test20
-set tname(tstringa4) test50
-set tname(tstringa5) test40
-set tname(tstringa6) test70
-set tname(tstringa7) test60
-set tname(tstringa9) test100
-
-set tname(tinta0) 10
-set tname(tinta1) 00
-set tname(tinta2) 30
-set tname(tinta3) 20
-set tname(tinta4) 50
-set tname(tinta5) 40
-set tname(tinta6) 70
-set tname(tinta7) 60
-set tname(tinta8) 90
-set tname(tinta9) 80
-set tname(tinta10) 110
-set tname(tinta11) 100
-set tname(tinta12) 130
-set tname(tinta13) 120
-set tname(tinta14) 150
-set tname(tinta15) 140
-set tname(tinta16) 170
-set tname(tinta17) 160
-set tname(tinta18) 190
-set tname(tinta19) 180
-set tname(tinta20) 210
-set tname(tinta21) 200
-set tname(tinta22) 230
-set tname(tinta23) 220
-set tname(tinta24) 250
-set tname(tinta25) 240
-set tname(tinta26) 270
-set tname(tinta27) 260
-set tname(tinta28) 290
-set tname(tinta29) 280
-set tname(tinta30) 310
-set tname(tinta31) 300
-