Avoid potential negative array index access to cached text.
[LibreOffice.git] / qadevOOo / tests / java / mod / _i18n / NumberFormatCodeMapper.java
blob92c42ac065d1ef7abf2e2c1ea253df6c2ed33edd
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package mod._i18n;
21 import java.io.PrintWriter;
23 import lib.TestCase;
24 import lib.TestEnvironment;
25 import lib.TestParameters;
27 import com.sun.star.lang.XMultiServiceFactory;
28 import com.sun.star.uno.XInterface;
30 /**
31 * Test for object which is represented by service
32 * <code>com.sun.star.i18n.NumberFormatCodeMapper</code>. <p>
34 * Object implements the following interfaces :
35 * <ul>
36 * <li> <code>com::sun::star::lang::XServiceInfo</code></li>
37 * <li> <code>com::sun::star::i18n::XNumberFormatCode</code></li>
38 * </ul> <p>
40 * This object test <b> is NOT </b> designed to be run in several
41 * threads concurrently.
43 * @see com.sun.star.lang.XServiceInfo
44 * @see com.sun.star.i18n.XNumberFormatCode
45 * @see ifc.lang._XServiceInfo
46 * @see ifc.i18n._XNumberFormatCode
48 public class NumberFormatCodeMapper extends TestCase {
50 /**
51 * Creating a TestEnvironment for the interfaces to be tested.
52 * Creates an instance of the service
53 * <code>com.sun.star.i18n.NumberFormatCodeMapper</code>.
55 @Override
56 public TestEnvironment createTestEnvironment( TestParameters Param,
57 PrintWriter log )
58 throws Exception {
59 XMultiServiceFactory xMSF = Param.getMSF();
60 Object oInterface = xMSF.createInstance
61 ( "com.sun.star.i18n.NumberFormatCodeMapper" );
62 XInterface oObj = (XInterface) oInterface;
64 log.println( " creating a new environment for NumberFormatCodeMapper object" );
65 TestEnvironment tEnv = new TestEnvironment( oObj );
67 return tEnv;
68 } // finish method getTestEnvironment
70 } // finish class NumberFormatCodeMapper