perl-module: Remove test for memory usage.
[pspp] / perl-module / t / Pspp.t
index 5d0789af9d431f4a8ccec93a14a01aaf0253bc86..b8b76d3c35d43b604deea796b4b964a35b9bb5d6 100644 (file)
@@ -25,7 +25,7 @@
 
 # change 'tests => 1' to 'tests => last_test_to_print';
 
-use Test::More tests => 38;
+use Test::More tests => 37;
 use Text::Diff;
 use File::Temp qw/ tempfile tempdir /;
 use Memory::Usage;
@@ -194,9 +194,9 @@ sub run_pspp_syntax_cmp
        LIST.
 SYNTAX
 Table: Variables
-Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values
-id,1,,Scale,Input,8,Right,F2.0,F2.0,
-name,2,,Nominal,Input,20,Left,A20,A20,
+Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format
+id,1,Scale,Input,8,Right,F2.0,F2.0
+name,2,Nominal,Input,20,Left,A20,A20
 
 Table: File Label
 Label,This is the file label
@@ -624,48 +624,3 @@ EOF
 
  ok ($n == 5, "Case count");
 }
-
-
-# Check for a leak in append_case
-{
-    my $record_count = 10_000;
-    my $var_count = 10;
-
-    # Record amount of memory used by current process
-    my $mu = Memory::Usage->new();
-
-    my $dict = PSPP::Dict->new();
-    foreach my $i (1..$var_count)
-    {
-        my $var = PSPP::Var->new ($dict, "var$i", fmt => 12, width => 2);
-        $var->set_label ("var $i");
-    }
-
-    my $sysfile = PSPP::Sysfile->new ('testfile.sav', $dict, compress => 1);
-
-    $mu->record('');
-
-    foreach my $i (1..$record_count)
-    {
-        my @data = map { int(rand() * 100) } (1..$var_count);
-        $sysfile->append_case (\@data);
-    }
-
-    $mu->record('');
-
-    $sysfile->close;
-
-    my @memstate = @{$mu->state()};
-
-    my @array0 = @{$memstate[0]};
-    my @array1 = @{$memstate[1]};
-
-    # ignore the timestamps
-    $array0[0] = 0;
-    $array1[0] = 0;
-
-    my $result0 = join(",",@array0);
-    my $result1 = join(",",@array1);
-
-    ok (($result0 eq $result1), "Memory management of append_case");
-}