Functions | Variables

file_test.m File Reference

Go to the source code of this file.

Functions

 disp ("\n---------------- Tests on Files ----------------")
 disp ("\nThe input files used in the test is:")
 disp (inf)
 disp (iof)
 disp (pinf_1)
 disp (piof_1)
 disp (pinf_2)
 disp (piof_2)
 fclose (fid)
 disp ("\n\nBlocking call to filetest...")
 disp ("Finishing the call...")
 if (ioline(1)==upper(ioline(1))) expected
 if (nioline(1)!=expected) passed=0
 if (tmp!=oline) passed=0
end if (passed==1) disp("\nSingle file test passed.")
else disp ("\nSingle file test failed.")
 if (pioline_1(1)==upper(pioline_1(1))) expected
 if (npioline_1(1)!=expected) passed=0
 if (pioline_2(1)==upper(pioline_2(1))) expected
end if (npioline_2(1)!=expected) passed=0
else disp ("Packed file test failed.\n")
end unlink (f2)
 unlink (pof_1)
 unlink (pof_2)
 disp ("---------------- Tests Done ----------------\n")

Variables

 warn_num_to_str = 0
 warn_str_to_num = 0
 inf = "filetest_m.in"
 iof = "filetest_m.inout"
 pinf_1 = "filetest_packed_1.in"
 piof_1 = "filetest_packed_1.inout"
 pinf_2 = "filetest_packed_2.in"
 piof_2 = "filetest_packed_2.inout"
 fid = fopen(iof, "rt")
 ioline = fgets(fid)
 pioline_1 = fgets(fid)
 pioline_2 = fgets(fid)
 iline = fgets(fid)
 nioline = fgets(fid)
 oline = fgets(f2)
 expected = "a"
end passed = 1
end tmp = iline + 1
 piline_1 = fgets(fid)
 npioline_1 = fgets(fid)
 pof_1 = char(f4(1, :))
 poline_1 = fgets(fid)
 piline_2 = fgets(fid)
 npioline_2 = fgets(fid)
 pof_2 = char(f4(2, :))
 poline_2 = fgets(fid)

Function Documentation

disp ( "\n---------------- Tests on Files ----------------"   ) 
disp ( "\nThe input files used in the test is:"   ) 
disp ( iof   ) 
disp ( piof_2   ) 
else disp ( "\nSingle file test failed."   ) 
disp ( pinf_1   ) 
disp ( "\n\nBlocking call to filetest..."   ) 
else disp ( "Packed file test failed.\n"   ) 
disp ( "Finishing the call..."   ) 
disp ( inf   ) 
disp ( piof_1   ) 
disp ( "---------------- Tests Done ----------------\n"   ) 
disp ( pinf_2   ) 
fclose ( fid   ) 

Here is the caller graph for this function:

if ( ioline(1)  = =upper(ioline(1))  ) 
if ( pioline_1(1)  = =upper(pioline_1(1))  ) 
end if ( npioline_2(1)!  = expected  )  [pure virtual]
if ( npioline_1(1)!  = expected  )  [pure virtual]
if ( pioline_2(1)  = =upper(pioline_2(1))  ) 
end if ( passed  = =1  ) 
if ( nioline(1)!  = expected  )  [pure virtual]
if ( tmp!  = oline  )  [pure virtual]
end unlink ( f2   ) 

Here is the caller graph for this function:

unlink ( pof_1   ) 
unlink ( pof_2   ) 

Variable Documentation

else expected = "a"

Definition at line 49 of file file_test.m.

end fid = fopen(iof, "rt")

Definition at line 21 of file file_test.m.

iline = fgets(fid)

Definition at line 38 of file file_test.m.

inf = "filetest_m.in"

Definition at line 6 of file file_test.m.

iof = "filetest_m.inout"

Definition at line 7 of file file_test.m.

ioline = fgets(fid)

Definition at line 22 of file file_test.m.

nioline = fgets(fid)

Definition at line 42 of file file_test.m.

npioline_1 = fgets(fid)

Definition at line 79 of file file_test.m.

npioline_2 = fgets(fid)

Definition at line 93 of file file_test.m.

oline = fgets(f2)

Definition at line 46 of file file_test.m.

end passed = 1

Definition at line 56 of file file_test.m.

piline_1 = fgets(fid)

Definition at line 74 of file file_test.m.

piline_2 = fgets(fid)

Definition at line 88 of file file_test.m.

pinf_1 = "filetest_packed_1.in"

Definition at line 8 of file file_test.m.

pinf_2 = "filetest_packed_2.in"

Definition at line 10 of file file_test.m.

piof_1 = "filetest_packed_1.inout"

Definition at line 9 of file file_test.m.

piof_2 = "filetest_packed_2.inout"

Definition at line 11 of file file_test.m.

pioline_1 = fgets(fid)

Definition at line 26 of file file_test.m.

pioline_2 = fgets(fid)

Definition at line 30 of file file_test.m.

pof_1 = char(f4(1, :))

Definition at line 82 of file file_test.m.

pof_2 = char(f4(2, :))

Definition at line 96 of file file_test.m.

poline_1 = fgets(fid)

Definition at line 84 of file file_test.m.

poline_2 = fgets(fid)

Definition at line 98 of file file_test.m.

end tmp = iline + 1

Definition at line 61 of file file_test.m.

Definition at line 1 of file file_test.m.

Definition at line 2 of file file_test.m.