org.hd.d.pg2k.test.dev
Class MiscTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.hd.d.pg2k.test.dev.MiscTest
All Implemented Interfaces:
junit.framework.Test

public final class MiscTest
extends junit.framework.TestCase

Miscellaneous tests not filed elsewhere. This should be kept as small as possible with tests being moved to better homes ASAP.


Field Summary
private static java.util.Random rnd
          Private source of OK pseudo-random numbers.
private static java.lang.String[] test7BitStrings
           
 
Constructor Summary
MiscTest(java.lang.String name)
           
 
Method Summary
static void test8To6()
          Test encoding to Base64 (as used in HTTP headers) and decoding thereof.
static void testAEPMemoryTweaks()
          Simple test for problems from memory-saving lazy evaluation, etc.
static void testAppVersion()
          Test that we can retrieve the application version.
static void testCompact7BitString()
          Test correct behaviour of Compact7BitString.
static void testDataPump()
          Test if the data pump.
static void testDummy()
          Dummy test to keep jUnit framework happy when there are no other tests in this class.
static void testLog2Approx()
          Test our quick log-2 computation.
static void testName()
          Test correct behaviour of Name.
static void testNameLonger()
          Test correct behaviour of Name.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

test7BitStrings

private static final java.lang.String[] test7BitStrings

rnd

private static final java.util.Random rnd
Private source of OK pseudo-random numbers.

Constructor Detail

MiscTest

public MiscTest(java.lang.String name)
Method Detail

testAppVersion

public static final void testAppVersion()
Test that we can retrieve the application version.


testLog2Approx

public static final void testLog2Approx()
Test our quick log-2 computation.


testDataPump

public static void testDataPump()
                         throws java.lang.Exception
Test if the data pump. Makes sure that at the very least it does not corrupt data passing through it.

We set up and test a number of pump instances to try to ensure that we not eating up (and failing to release) vast system resources even if the caller fails to explicitly close() all the stream.

Throws:
java.lang.Exception

test8To6

public static void test8To6()
Test encoding to Base64 (as used in HTTP headers) and decoding thereof.


testCompact7BitString

public static void testCompact7BitString()
Test correct behaviour of Compact7BitString. Basic tests.


testName

public static void testName()
                     throws java.lang.Exception
Test correct behaviour of Name. Very basic tests.

Throws:
java.lang.Exception

testNameLonger

public static void testNameLonger()
                           throws java.lang.Exception
Test correct behaviour of Name. Tests on slightly longer/harder values.

Throws:
java.lang.Exception

testAEPMemoryTweaks

public static final void testAEPMemoryTweaks()
Simple test for problems from memory-saving lazy evaluation, etc.


testDummy

public static final void testDummy()
Dummy test to keep jUnit framework happy when there are no other tests in this class.


DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.