Ejemplo n.º 1
0
 public static void Main(String[] args)
 {
     try {
         TestDataModule m = new ResourceModule(
             "com/ibm/icu/dev/data/testdata/", "DataDrivenCollationTest");
         System.Console.Out.WriteLine("hello: " + m.GetName());
         m.GetInfo();
         m.GetTestDataIterator();
     } catch (TestDataModule_Constants.DataModuleFormatError e) {
         // TODO Auto-generated catch block
         System.Console.Out.WriteLine("???");
         Console.Error.WriteLine(e.StackTrace);
     }
 }
Ejemplo n.º 2
0
            internal UResourceTestData(ResourceModule module, UResourceBundle defaultHeader_0, UResourceBundle theRes)
            {
                outer_ResourceModule = module;
                IBM.ICU.Charset.ResourceModule.Assert_is(theRes != null &&
                                                         theRes.GetType() == IBM.ICU.Util.UResourceBundle.TABLE);
                res = theRes;
                // unfortunately, actually, data can be either ARRAY or STRING
                data = IBM.ICU.Charset.ResourceModule.GetFromTable(res, IBM.ICU.Charset.ResourceModule.DATA, new int[] { IBM.ICU.Util.UResourceBundle.ARRAY,
                                                                                                                         IBM.ICU.Util.UResourceBundle.STRING });

                try {
                    // unfortunately, actually, data can be either ARRAY or STRING
                    header = IBM.ICU.Charset.ResourceModule.GetFromTable(res, IBM.ICU.Charset.ResourceModule.HEADER, new int[] {
                        IBM.ICU.Util.UResourceBundle.ARRAY, IBM.ICU.Util.UResourceBundle.STRING
                    });
                } catch (MissingManifestResourceException e) {
                    if (defaultHeader_0 == null)
                    {
                        throw new TestDataModule_Constants.DataModuleFormatError(
                                  "Unable to find a header for test data '"
                                  + res.GetKey()
                                  + "' and no default header exist.");
                    }
                    else
                    {
                        header = defaultHeader_0;
                    }
                }
                try {
                    settings = IBM.ICU.Charset.ResourceModule.GetFromTable(res, IBM.ICU.Charset.ResourceModule.SETTINGS, IBM.ICU.Util.UResourceBundle.ARRAY);
                    info     = IBM.ICU.Charset.ResourceModule.GetFromTable(res, IBM.ICU.Charset.ResourceModule.INFO, IBM.ICU.Util.UResourceBundle.TABLE);
                } catch (MissingManifestResourceException e_1) {
                    // do nothing, left them null;
                    settings = data;
                }
            }
Ejemplo n.º 3
0
 /// <param name="paramouter_ResourceModule"></param>
 /// <param name="theRes"></param>
 public Anonymous_C2(ResourceModule paramouter_ResourceModule,
                     UResourceBundle theRes) : base(theRes)
 {
     this.outer_ResourceModule = paramouter_ResourceModule;
 }