6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javafx.css;
27
28 import static org.junit.Assert.assertEquals;
29 import static org.junit.Assert.fail;
30
31 import java.io.IOException;
32 import javafx.geometry.Insets;
33 import javafx.scene.text.Font;
34
35 import org.junit.Before;
36 import org.junit.Test;
37
38 import javafx.css.CssParser;
39
40
41 public class InsetsTypeTest {
42
43 String[] css;
44
45 Insets[][] expResults;
46
47 // values for top, right, bottom, left
48 final float[][][] fvals = new float[][][] {
49 { {1.0f} },
50 { {-1.0f, 0.0f, 1.0f, 2.0f} },
51 { {1.0f}, {2.0f}, {3.0f}, {4.0f} },
52 { {1.0f, 0.0f, 1.0f, 2.0f},
53 {2.0f, 0.0f, 1.0f, 2.0f},
54 {3.0f, 0.0f, 1.0f, 2.0f},
55 {4.0f, 0.0f, 1.0f, 2.0f} },
56 { {1.0f},
57 {2.0f, -1.0f},
58 {3.0f, 0.0f, 1.0f, 2.0f},
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package test.javafx.css;
27
28 import test.javafx.css.TypeTest;
29 import static org.junit.Assert.assertEquals;
30 import static org.junit.Assert.fail;
31
32 import java.io.IOException;
33 import javafx.geometry.Insets;
34 import javafx.scene.text.Font;
35
36 import org.junit.Before;
37 import org.junit.Test;
38
39 import javafx.css.CssParser;
40 import javafx.css.CssParser;
41 import javafx.css.ParsedValue;
42 import javafx.css.Stylesheet;
43
44
45 public class InsetsTypeTest {
46
47 String[] css;
48
49 Insets[][] expResults;
50
51 // values for top, right, bottom, left
52 final float[][][] fvals = new float[][][] {
53 { {1.0f} },
54 { {-1.0f, 0.0f, 1.0f, 2.0f} },
55 { {1.0f}, {2.0f}, {3.0f}, {4.0f} },
56 { {1.0f, 0.0f, 1.0f, 2.0f},
57 {2.0f, 0.0f, 1.0f, 2.0f},
58 {3.0f, 0.0f, 1.0f, 2.0f},
59 {4.0f, 0.0f, 1.0f, 2.0f} },
60 { {1.0f},
61 {2.0f, -1.0f},
62 {3.0f, 0.0f, 1.0f, 2.0f},
|