* Re: Classpath java.io Test Contents
@ 1998-12-03 6:43 Aaron M. Renn
1998-12-03 9:50 ` Tom Tromey
0 siblings, 1 reply; 5+ messages in thread
From: Aaron M. Renn @ 1998-12-03 6:43 UTC (permalink / raw)
To: mauve-discuss
>Do any of your tests rely on reading a pre-existing data file? If so,
>we'll probably want to make it possible for the test cases to find the
>srcdir.
Yes, various tests require a known good input source in the form of a file
on disk. We'll need to handle that.
>Especially important is segregation by JDK version number. E.g., try
>not to require JDK1.2 functionality in a test that tests something
>introduced in JDK1.0.
I'll have to look more at the framework you've developed. I am sure there
will be lots of changes I need to make.
--
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Classpath java.io Test Contents
1998-12-03 6:43 Classpath java.io Test Contents Aaron M. Renn
@ 1998-12-03 9:50 ` Tom Tromey
0 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 1998-12-03 9:50 UTC (permalink / raw)
To: Aaron M. Renn; +Cc: mauve-discuss
>> Do any of your tests rely on reading a pre-existing data file? If
>> so, we'll probably want to make it possible for the test cases to
>> find the srcdir.
Aaron> Yes, various tests require a known good input source in the
Aaron> form of a file on disk. We'll need to handle that.
Ok. I've added a `getSourceDirectory' method to the test harness. It
returns the top-level source directory as a File object. I'll check
this in shortly.
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Classpath java.io Test Contents
1998-12-02 22:15 ` Tom Tromey
@ 1998-12-02 23:12 ` Geoff Berry
0 siblings, 0 replies; 5+ messages in thread
From: Geoff Berry @ 1998-12-02 23:12 UTC (permalink / raw)
To: mauve-discuss
Tom Tromey <tromey@cygnus.com> writes:
> Do any of your tests rely on reading a pre-existing data file? If so,
> we'll probably want to make it possible for the test cases to find the
> srcdir.
The serialization tests I wrote read in serialized objects from files
and compare them to in-memory serialized streams
(ByteArrayI/OStream). I suppose this could be gotten around by hard
coding the correct serialized data into the class as a byte array
(this would also keep bugs in the File I/O classes from causing a
false error), but that would be more of a pain.
--
Geoff Berry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Classpath java.io Test Contents
1998-12-02 20:06 Aaron M. Renn
@ 1998-12-02 22:15 ` Tom Tromey
1998-12-02 23:12 ` Geoff Berry
0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 1998-12-02 22:15 UTC (permalink / raw)
To: Aaron M. Renn; +Cc: mauve-discuss
>>>>> "Aaron" == Aaron M Renn <arenn@urbanophile.com> writes:
Aaron> Below I'm attaching an outline of the contents of our java.io
Aaron> test package. As I said eariler, it basically prints a line
Aaron> that starts with "PASSED:" for a passed test or "FAILED:" for a
Aaron> failed test. Some tests just print output and it is up for you
Aaron> to see if it looks right.
I converted a couple Classpath tests today -- the two java.beans
tests. These should give an idea of what the tests end up looking
like (one I rewrote extensively, but the other is fairly similar to
the original source).
I'd prefer to see the imported tests use the `check' method on the
harness instead of printing pass/fail by themselves. That lets us
play games with the harness when appropriate.
Maybe it's time to solve the "expected output" problem. We could add
a new `check (String)' method that would check the output to
System.out against the given string. Then we'd just have to change
the test harness to override System.out before each test run.
Thoughts?
Do any of your tests rely on reading a pre-existing data file? If so,
we'll probably want to make it possible for the test cases to find the
srcdir.
Aaron> How do you want me to put it in? It looks like the existing
Aaron> tests have a subdirectory per class tested, but I've got some
Aaron> files that test multiple classes.
If it's possible, split them up. Of course, it probably isn't
possible to really test single I/O classes in isolation. Still, give
a good try at categorizing, when possible. Being able to (de-)select
on a class-by-class basis is an important feature of the test suite.
Especially important is segregation by JDK version number. E.g., try
not to require JDK1.2 functionality in a test that tests something
introduced in JDK1.0.
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Classpath java.io Test Contents
@ 1998-12-02 20:06 Aaron M. Renn
1998-12-02 22:15 ` Tom Tromey
0 siblings, 1 reply; 5+ messages in thread
From: Aaron M. Renn @ 1998-12-02 20:06 UTC (permalink / raw)
To: mauve-discuss
Below I'm attaching an outline of the contents of our java.io test package.
As I said eariler, it basically prints a line that starts with "PASSED:" for
a passed test or "FAILED:" for a failed test. Some tests just print output
and it is up for you to see if it looks right.
I took at look at the Kaffe 1.0b2 test package and it does not appear to
have a major java.io specific component. Unless Cygnus has something better,
I'll go ahead and check this into the archives over the weekend (along with
the rest of our stuff, which I will also try to document by that time).
How do you want me to put it in? It looks like the existing tests have a
subdirectory per class tested, but I've got some files that test multiple
classes.
Feel free to comment.
Here's the info:
--------------
A description of the tests for java.io. These files reside in the
directory test/java.io/ in the Classpath CVS archive. In general, each
test prints a line that starts with "PASSED:" if it passed or
"FAILED:" if it failed. Lots of other debugging type output is generated.
BufferedByteOutputStreamTest.java:
Classes Tested: BufferedOutputStream, ByteArrayOutputStream
Specific Tests:
Test 1: Writes a known string to a ByteArrayOutputStream
wrappered by a BufferedOutputStream and compares to see
if it gets the same string back.
BufferedCharWriterTest.java:
Classes Tested: BufferedWriter, CharArrayWriter
Specific Tests:
Test 1: Writes a known string to a CharArrayWriter
wrappered by a BufferedWriter and compares to see
if it gets the same string back.
BufferedInputStreamTest.java
Classes Tested: BufferedInputStream
Specific Tests:
Test 1: Protected Variable Values for subclasses
Test 2: Simple read test
Test 3: Mark/reset test (underlying stream does not support mark)
Test 4: Mark/reset test (underlying stream does support mark)
BufferedReaderTest.java
Classes Tested: BufferedReader
Specific Tests:
Test 1: Simple read test
Test 2: Mark/reset test (underlying stream does not support mark)
Test 3: Mark/reset test (underlying stream does support mark)
ByteArrayInputStreamTest.java
Classes Tested: ByteArrayInputStream
Specific Tests:
Test 1: Protected Variable Values for subclasses
Test 2: Simple read test
Test 3: mark/reset/skip/available test
CharArrayReaderTest.java
Classes Tested: CharArrayReader
Specific Tests:
Test 1: Protected Variable Values for subclasses
Test 2: Simple read test
Test 3: mark/reset/skip/ready test
DataInputOutputTest.java
Classes Tested: DataInputStream, DataOutputStream
Specific Tests:
Test 1: Call all DataOutputStream write methods
Test 2: Call all DataInputStream read methods on output from test 1
Test 3: Call all DataInputStream read methods on known input data
FileInputStreamTest.java
Classes Tested: FileInputStream
Specific Tests:
Test 1: File read test (include get FileDescriptor/available/skip)
Test 2: File not found test
FileOutputStreamTest.java
Classes Tested: FileOutputStream
Specific Tests:
Test 1: File write test.
Test 2: Permission denied test
FileReaderTest.java
Classes Tested: FileReader, InputStreamReader, internal char converters
Specific Tests:
Test 1: File read test (includes skip)
Test 2: File not found test
FileTest.java
Classes Tested: File
Specific Tests:
Test 1: Path operations tests
Test 2: File/directory manipulation test
Test 3: Read/write permissions test
Test 4: Name comparision tests
FileWriterTest.java
Classes Tested: FileWriter, OutputStreamWriter, internal char converters
Specific Tests:
Test 1: File write test
Test 2: Permission Denied Test
LineNumberInputStreamTest.java
Classes Tested: LineNumberInputStream
Specific Tests:
Test 1: Basic line count test (includes various termination styles)
Test 2: Basic line count test (no trailing newline)
LineNumberReader.java
Classes Tested: LineNumberInputStream
Specific Tests:
Test 1: Basic line count test (with trailing newline)
Test 2: Basic line count test (no trailing newline)
PipedReaderWriterTest.java
Classes Tested: PipedReader, PipedWriter
Specific Tests:
Test 1: Basic pipe test
PipedStreamTest.java
Classes Tested: PipedInputStream, PipedOutputStream
Specific Tests:
Test 1: Basic pipe test
PrintStreamTest.java
Classes Tested: PrintStream
Specific Tests:
Test 1: Test of all print/println/write methods
PrintWriterTest.java
Classes Tested: PrintWriter
Specific Tests:
Test 1: Test of all print/println/write methods
PushbackInputStreamTest.java
Classes Tested: PushbackInputStream
Specific Tests:
Test 1: Protected variable values for subclasses
Test 2: Basic unread tests
Test 3: Buffer overflow test
PushbackWriterTest.java
Classes Tested: PushbackWriter
Specific Tests:
Test 1: Basic unread tests
Test 2: Buffer overflow test
RandomAccessFileTest.java
Classes Tested: RandomAccessFile
Specific Tests:
Test 1: Call all write methods
Test 2: Seek test
Test 3: Validation test
Test 4: Set file length test
SequenceInputStreamTest.java
Classes Tested: SequenceInputStream, StringBufferInputStream
Specific Tests:
Test 1: Simple read test
Test 2: close() test
StringBufferInputStreamTest.java
Classes Tested: StringBufferInputStream
Specific Tests:
Test 1: Protected variable values for subclasses
Test 2: Simple read test
Test 3: Available/skip test
StringWriterTest.java
Classes Tested: StringWriter
Specific Tests:
Test 1: Basic write tests
UTF8EncodingTest.java
Classes Tested: Internal char converter for UTF8
Specific Tests:
Test 1: Write Unicode as UTF8
Test 2: Read known UTF8 file
Test 3: Read output of test 1
--
Aaron M. Renn (arenn@urbanophile.com) http://www.urbanophile.com/arenn/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-12-03 9:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-03 6:43 Classpath java.io Test Contents Aaron M. Renn
1998-12-03 9:50 ` Tom Tromey
-- strict thread matches above, loose matches on Subject: below --
1998-12-02 20:06 Aaron M. Renn
1998-12-02 22:15 ` Tom Tromey
1998-12-02 23:12 ` Geoff Berry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).