projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added some extraneous crud to .cvsignore files
[pspp]
/
src
/
language
/
tests
/
casefile-test.c
diff --git
a/src/language/tests/casefile-test.c
b/src/language/tests/casefile-test.c
index c6885c61d9289533acad9df4540ce949ca92bcb7..eb8ee061956db8569e5c930d82157907ecf77ee4 100644
(file)
--- a/
src/language/tests/casefile-test.c
+++ b/
src/language/tests/casefile-test.c
@@
-1,6
+1,5
@@
/* PSPP - computes sample statistics.
Copyright (C) 2004 Free Software Foundation, Inc.
/* PSPP - computes sample statistics.
Copyright (C) 2004 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@
-45,7
+44,7
@@
static void test_casereader_clone (struct casereader *reader1, size_t case_cnt);
static void fail_test (const char *message, ...);
int
static void fail_test (const char *message, ...);
int
-cmd_debug_casefile (struct dataset *ds UNUSED)
+cmd_debug_casefile (struct
lexer *lexer, struct
dataset *ds UNUSED)
{
static const size_t sizes[] =
{
{
static const size_t sizes[] =
{
@@
-57,15
+56,15
@@
cmd_debug_casefile (struct dataset *ds UNUSED)
int pattern;
size_max = sizeof sizes / sizeof *sizes;
int pattern;
size_max = sizeof sizes / sizeof *sizes;
- if (lex_match_id ("SMALL"))
+ if (lex_match_id (
lexer,
"SMALL"))
{
size_max -= 4;
case_max = 511;
}
else
case_max = 4095;
{
size_max -= 4;
case_max = 511;
}
else
case_max = 4095;
- if (
token
!= '.')
- return lex_end_of_command ();
+ if (
lex_token (lexer)
!= '.')
+ return lex_end_of_command (
lexer
);
for (pattern = 0; pattern < 7; pattern++)
{
for (pattern = 0; pattern < 7; pattern++)
{
@@
-160,8
+159,8
@@
test_casefile (int pattern, size_t value_cnt, size_t case_cnt)
fail_test ("Premature end of casefile.");
for (j = 0; j < value_cnt; j++)
{
fail_test ("Premature end of casefile.");
for (j = 0; j < value_cnt; j++)
{
- double a = case_num (&read_case, j);
- double b = case_num (&expected_case, j);
+ double a = case_num
_idx
(&read_case, j);
+ double b = case_num
_idx
(&expected_case, j);
if (a != b)
fail_test ("Case %lu fails comparison.", (unsigned long) i);
}
if (a != b)
fail_test ("Case %lu fails comparison.", (unsigned long) i);
}
@@
-180,7
+179,7
@@
get_random_case (struct ccase *c, size_t value_cnt, size_t case_idx)
int i;
case_create (c, value_cnt);
for (i = 0; i < value_cnt; i++)
int i;
case_create (c, value_cnt);
for (i = 0; i < value_cnt; i++)
- case_data_rw (c, i)->f = case_idx % 257 + i;
+ case_data_rw
_idx
(c, i)->f = case_idx % 257 + i;
}
static void
}
static void
@@
-205,8
+204,8
@@
read_and_verify_random_case (struct casefile *cf,
fail_test ("Premature end of casefile.");
for (i = 0; i < value_cnt; i++)
{
fail_test ("Premature end of casefile.");
for (i = 0; i < value_cnt; i++)
{
- double a = case_num (&read_case, i);
- double b = case_num (&expected_case, i);
+ double a = case_num
_idx
(&read_case, i);
+ double b = case_num
_idx
(&expected_case, i);
if (a != b)
fail_test ("Case %lu fails comparison.", (unsigned long) case_idx);
}
if (a != b)
fail_test ("Case %lu fails comparison.", (unsigned long) case_idx);
}