2 *******************************************************************************
3 * Copyright (C) 1996-2011, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
9 package com.ibm.icu.dev.test.serializable;
13 import com.ibm.icu.util.VersionInfo;
16 * This class writes the test objects for each class to a file. The work is
17 * actually done by the superclass, CoverageTest. This class just constructs
18 * a CoverageTest w/ a non-null path, which tells it to write the data.
21 public class SerializableWriter extends CoverageTest
23 public SerializableWriter(String path)
28 private static String folderName()
30 int major = VersionInfo.ICU_VERSION.getMajor();
31 int minor = VersionInfo.ICU_VERSION.getMinor();
32 int milli = VersionInfo.ICU_VERSION.getMilli();
33 int micro = VersionInfo.ICU_VERSION.getMicro();
34 StringBuffer result = new StringBuffer("ICU_");
40 if (milli != 0 || micro != 0) {
50 return result.toString();
53 public static void main(String[] args)
56 if (args.length == 0) {
57 URL dataURL = SerializableWriter.class.getResource("data");
58 outDir = dataURL.getPath() + "/" + folderName();
60 outDir = args[0] + "/" + folderName();
62 CoverageTest test = new SerializableWriter(outDir);