You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/03/26 10:44:56 UTC

svn commit: r641224 - /myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/component/LayoutTokensUnitTest.java

Author: bommel
Date: Wed Mar 26 02:44:55 2008
New Revision: 641224

URL: http://svn.apache.org/viewvc?rev=641224&view=rev
Log:
Merged revisions 638959-638970 via svnmerge from
https://svn.apache.org/repos/asf/myfaces/tobago/trunk

........
 r638959 | idus | 2008-03-19 19:21:16 +0100 (Mi, 19 Mär 2008) | 1 line

 TOBAGO-639: Avoid usage of implicit regular expressions in parsing.
........
 r638970 | idus | 2008-03-19 19:47:06 +0100 (Mi, 19 Mär 2008) | 1 line

 TOBAGO-639: Avoid usage of implicit regular expressions
........

Added:
    myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/component/LayoutTokensUnitTest.java   (with props)

Added: myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/component/LayoutTokensUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/component/LayoutTokensUnitTest.java?rev=641224&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/component/LayoutTokensUnitTest.java (added)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/component/LayoutTokensUnitTest.java Wed Mar 26 02:44:55 2008
@@ -0,0 +1,41 @@
+package org.apache.myfaces.tobago.component;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import junit.framework.TestCase;
+
+public class LayoutTokensUnitTest extends TestCase {
+
+  public void testIsPixelToken() {
+    assertTrue(LayoutTokens.isPixelToken("120px"));
+  }
+
+  public void testIsPercentToken() {
+    assertTrue(LayoutTokens.isPercentToken("50%"));
+  }
+
+  public void testIsRelativeToken() {
+    assertTrue(LayoutTokens.isRelativeToken("3*"));
+  }
+
+  public void testIsNumberAndSuffix() {
+    assertTrue(LayoutTokens.isNumberAndSuffix("34cm", "cm"));
+    assertFalse(LayoutTokens.isNumberAndSuffix("acm", "cm"));
+    assertFalse(LayoutTokens.isNumberAndSuffix("cm", "cm"));
+  }
+}

Propchange: myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/component/LayoutTokensUnitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/branches/tobago-1.0.x/core/src/test/java/org/apache/myfaces/tobago/component/LayoutTokensUnitTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL