GPU-Calc: remove Alloc_Host_Ptr for clmem of NAN vector
[LibreOffice.git] / svl / qa / complex / ConfigItems / CheckConfigItems.java
blob292ec461f8cee774a42e000d8e13b01f6afb8137
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 complex.ConfigItems;
21 import com.sun.star.beans.NamedValue;
22 import com.sun.star.lang.XMultiServiceFactory;
23 import com.sun.star.task.XJob;
24 import com.sun.star.uno.UnoRuntime;
27 import org.junit.After;
28 import org.junit.AfterClass;
29 import org.junit.Before;
30 import org.junit.BeforeClass;
31 import org.junit.Test;
32 import org.openoffice.test.OfficeConnection;
33 // import static org.junit.Assert.*;
35 //-----------------------------------------------
36 /** @short todo document me
37 * @deprecated this tests seems no longer work as expected.
39 public class CheckConfigItems
41 //-------------------------------------------
42 // some const
44 //-------------------------------------------
45 // member
47 /** points to the global uno service manager. */
48 private XMultiServiceFactory m_xSmgr = null;
50 /** implements real config item tests in C++. */
51 private XJob m_xTest = null;
53 //-------------------------------------------
54 // test environment
56 //-------------------------------------------
57 /** @short A function to tell the framework,
58 which test functions are available.
60 @return All test methods.
61 @todo Think about selection of tests from outside ...
63 // public String[] getTestMethodNames()
64 // {
65 // return new String[]
66 // {
67 // "checkPicklist",
68 // "checkURLHistory",
69 // "checkHelpBookmarks",
70 // "checkPrintOptions",
71 // "checkAccessibilityOptions",
72 // "checkUserOptions"
73 // };
74 // }
76 //-------------------------------------------
77 /** @short Create the environment for following tests.
79 * @throws java.lang.Exception
80 * @descr Use either a component loader from desktop or
81 from frame
83 @Before public void before()
84 throws java.lang.Exception
86 // get uno service manager from global test environment
87 m_xSmgr = getMSF();
89 // TODO register helper service
91 // create module manager
92 m_xTest = UnoRuntime.queryInterface(XJob.class, m_xSmgr.createInstance("com.sun.star.comp.svl.ConfigItemTest"));
95 //-------------------------------------------
96 /**
97 * @throws java.lang.Exception
98 * @short close the environment.
100 @After public void after()
101 throws java.lang.Exception
103 // TODO deregister helper service
105 m_xTest = null;
106 m_xSmgr = null;
109 //-------------------------------------------
111 * @throws java.lang.Exception
112 * @todo document me
114 @Test public void checkPicklist()
115 throws java.lang.Exception
117 impl_triggerTest("checkPicklist");
120 //-------------------------------------------
122 * @throws java.lang.Exception
123 * @todo document me
125 @Test public void checkURLHistory()
126 throws java.lang.Exception
128 impl_triggerTest("checkURLHistory");
131 //-------------------------------------------
133 * @throws java.lang.Exception
134 * @todo document me
136 @Test public void checkHelpBookmarks()
137 throws java.lang.Exception
139 impl_triggerTest("checkHelpBookmarks");
142 //-------------------------------------------
144 * @throws java.lang.Exception
145 * @todo document me
147 // @Test public void checkPrintOptions()
148 // throws java.lang.Exception
149 // {
150 // impl_triggerTest("checkPrintOptions");
151 // }
153 //-------------------------------------------
155 * @throws java.lang.Exception
156 * @todo document me
158 @Test public void checkAccessibilityOptions()
159 throws java.lang.Exception
161 impl_triggerTest("checkAccessibilityOptions");
164 //-------------------------------------------
166 * @throws java.lang.Exception
167 * @todo document me
169 @Test public void checkUserOptions()
170 throws java.lang.Exception
172 impl_triggerTest("checkUserOptions");
175 //-------------------------------------------
176 /** @todo document me
178 private void impl_triggerTest(String sTest)
179 throws java.lang.Exception
181 NamedValue[] lArgs = new NamedValue[1];
182 lArgs[0] = new NamedValue();
183 lArgs[0].Name = "Test";
184 lArgs[0].Value = sTest;
185 m_xTest.execute(lArgs);
189 private XMultiServiceFactory getMSF()
191 final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
192 return xMSF1;
195 // setup and close connections
196 @BeforeClass public static void setUpConnection() throws Exception {
197 System.out.println("setUpConnection()");
198 connection.setUp();
201 @AfterClass public static void tearDownConnection()
202 throws InterruptedException, com.sun.star.uno.Exception
204 System.out.println("tearDownConnection()");
205 connection.tearDown();
208 private static final OfficeConnection connection = new OfficeConnection();