/** Test functions for ArrayDemos. */ public class TestArrayDemos { /** Run unit tests for ArrayDemos#indexOf. */ public static void testIndexOf() { TestUtils.equalInts( ArrayDemos.indexOf("hello",'e'), 1 ); TestUtils.equalInts( ArrayDemos.indexOf("hello",'x'), 5 ); TestUtils.equalInts( ArrayDemos.indexOf("hello",'l'), 2 ); TestUtils.equalInts( ArrayDemos.indexOf("",'e'), 0 ); TestUtils.equalInts( ArrayDemos.indexOf_v2("hello",'e'), 1 ); TestUtils.equalInts( ArrayDemos.indexOf_v2("hello",'x'), 5 ); TestUtils.equalInts( ArrayDemos.indexOf_v2("hello",'l'), 2 ); TestUtils.equalInts( ArrayDemos.indexOf_v2("",'e'), 0 ); TestUtils.equalInts( ArrayDemos.indexOf_v3("hello",'e'), 1 ); TestUtils.equalInts( ArrayDemos.indexOf_v3("hello",'x'), 5 ); TestUtils.equalInts( ArrayDemos.indexOf_v3("hello",'l'), 2 ); TestUtils.equalInts( ArrayDemos.indexOf_v3("",'e'), 0 ); } /** Run unit tests for ArrayDemos#max. */ public static void testMax() { } /** Run unit tests for ArrayDemos#indexOf. */ public static void testIndexOfMax() { } /** Run unit tests for ArrayDemos#min(String[]). */ public static void testMin() { } /** Run unit tests for ArrayDemos#countOccurrences(String[],char). */ public static void testCountOccurrences() { } /** Run unit tests for ArrayDemos#arrayToString. */ public static void testArrayToString() { } /** Run all unit tests. */ public static void main( String[] args ) { testIndexOf(); testMax(); testIndexOfMax(); testMin(); testCountOccurrences(); testArrayToString(); } }