Package com.ibm.icu.dev.test.TestDataModule

Examples of com.ibm.icu.dev.test.TestDataModule.DataMap


    public void processModules() {
        //String testName = t.getName().toString();

        for (Iterator siter = t.getSettingsIterator(); siter.hasNext();) {
            // Iterate through and get each of the test case to process
            DataMap settings = (DataMap) siter.next();
           
            String type = settings.getString("Type");
           
            if(type.equals("convert_fwd")) {
                testConvert(t, settings, true);
            } else if(type.equals("convert_rev")) {
                testConvert(t, settings, false);
View Full Code Here


//        DateFormat fmt = new SimpleDateFormat("EEE MMM dd yyyy / YYYY'-W'ww-ee");
        // Start the processing
        int n = 0;
        for (Iterator iter = testData.getDataIterator(); iter.hasNext();) {
            ++n;
            DataMap currentCase = (DataMap) iter.next();
           
            String caseString = "["+testData.getName()+"#"+n+" "+"]";
             String locale = testSetting = currentCase.getString("locale");
            ULocale fromLoc = new ULocale(testSetting);
            Calendar fromCalendar = Calendar.getInstance(fromLoc);
           
            fromSet.clear();
            toSet.clear();

            String from = currentCase.getString("from");
            fromSet.parseFrom(from);
            String to = currentCase.getString("to");
            toSet.parseFrom(to, fromSet);

            // now, do it.
            if (forward) {
                logln(caseString +" "+locale+"/"+from+" >>> "+loc+"/"
View Full Code Here

       
        boolean useDate = false;
       
        for (Iterator iter = testData.getDataIterator(); iter.hasNext();) {
            ++n;
            DataMap currentCase = (DataMap) iter.next();
           
            String caseString = "[case "+n+"]";
            // build to calendar
            //             Headers { "locale","from","operation","params","to" }
            // #1 locale
            String param = "locale";
            String locale;
            String testSetting = currentCase.getString(param);
            locale = testSetting;
            ULocale loc = new ULocale(locale);
            Calendar fromCalendar = Calendar.getInstance(loc);

            fromSet.clear();
            // #2 'from' info
            param = "from";
            String from = testSetting=currentCase.getString(param);
            if(from.startsWith(kMILLIS)){
                useDate = true;
                fromDate = Long.parseLong(from.substring(kMILLIS.length()));
            }else{
                fromSet.parseFrom(testSetting);
            }
//            System.err.println("fromset: ["+testSetting+"] >> " + fromSet);

            // #4 'operation' info
            param = "operation";
            String operation = testSetting=currentCase.getString(param);
            paramsSet.clear();
            // #3 'params' info
            param = "params";
            String paramsData = testSetting =  currentCase.getString(param);
            paramsSet.parseFrom(paramsData); // parse with inheritance.
//            System.err.println("paramsSet: ["+testSetting+"] >> " + paramsSet);
           
            toSet.clear();
            // #4 'to' info
            param = "to";
            String to = testSetting=currentCase.getString(param);
           if(to.startsWith(kMILLIS)){
                useDate = true;
                toDate = Long.parseLong(to.substring(kMILLIS.length()));
            }else{
                toSet.parseFrom(testSetting, fromSet);
View Full Code Here

            int testToUnicode = 0;
            String testName = t.getName().toString();

            // Iterate through and get each of the test case to process
            for (Iterator iter = t.getDataIterator(); iter.hasNext();) {
                DataMap testcase = (DataMap) iter.next();

                if (testName.equalsIgnoreCase("toUnicode")) {
                    TestToUnicode(testcase, testToUnicode);
                    testToUnicode++;
View Full Code Here

    public void processModules() {
        //String testName = t.getName().toString();

        for (Iterator siter = t.getSettingsIterator(); siter.hasNext();) {
            // Iterate through and get each of the test case to process
            DataMap settings = (DataMap) siter.next();
           
            String type = settings.getString("Type");

            if(type.equals("date_format")) {
                testConvertDate(t, settings, true);
            } else if(type.equals("date_parse")) {
                testConvertDate(t, settings, false);
View Full Code Here

        int n = 0;
        for (Iterator iter = testData.getDataIterator(); iter.hasNext();) {
            ++n;
            long now = System.currentTimeMillis();
            DataMap currentCase = (DataMap) iter.next();
            String caseString = "["+testData.getName()+"#"+n+(fmt?"format":"parse")+"]";
           
            String locale = currentCase.getString("locale");
            String spec = currentCase.getString("spec");
            String date = currentCase.getString("date");
            String str = currentCase.getString("str");
           
            Date fromDate = null;
            boolean useDate = false;
           
            ULocale loc = new ULocale(locale);
View Full Code Here

        super("com/ibm/icu/dev/data/testdata/", "DataDrivenCollationTest");
    }
   
    public void processModules() {
        for (Iterator iter = t.getSettingsIterator(); iter.hasNext();) {
            DataMap setting = (DataMap) iter.next();
            processSetting(setting);
        }
    }
View Full Code Here

        */
    }

    private void processTestCases(RuleBasedCollator col) {
        for (Iterator iter = t.getDataIterator(); iter.hasNext();) {
            DataMap e1 =  (DataMap) iter.next();
            processSequence(col, e1.getString("sequence"));
     }
    }
View Full Code Here

    /**
     * Override of TestFmwk method to get the test suite description from the
     * DESCRIPTION field of the module info.
     */
    protected String getDescription() {
        DataMap info = moduleInfo();
        if (info != null) {
            // return info.getString(TestDataModule.DESCRIPTION);
        }
        return null;
    }
View Full Code Here

     * Override of TestFmwk method to get the test method description from the
     * DESCRIPTION field of the test info.
     */
    protected String getMethodDescription(String methodName) {
        if (openTestData(methodName)) {
            DataMap info = testInfo();
            if (info != null) {
                // return info.getString(TestDataModule.DESCRIPTION);
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of com.ibm.icu.dev.test.TestDataModule.DataMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.