Author: tilman Date: Sun Jul 12 15:10:31 2015 New Revision: 1690472 URL: http://svn.apache.org/r1690472 Log: PDFBOX-2872: simple test
Added: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/MatrixTest.java (with props) Added: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/MatrixTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/MatrixTest.java?rev=1690472&view=auto ============================================================================== --- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/MatrixTest.java (added) +++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/MatrixTest.java Sun Jul 12 15:10:31 2015 @@ -0,0 +1,48 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed 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. + */ +package org.apache.pdfbox.util; + +import org.apache.pdfbox.cos.COSArray; +import org.apache.pdfbox.cos.COSFloat; +import org.junit.Test; +import static org.junit.Assert.*; + +/** + * + * @author Tilman Hausherr + */ +public class MatrixTest +{ + + /** + * Test of PDFBOX-2872 bug + */ + @Test + public void testPdfbox2872() + { + Matrix m = new Matrix(2, 4, 5, 8, 2, 0); + COSArray toCOSArray = m.toCOSArray(); + assertEquals(new COSFloat(2), toCOSArray.get(0)); + assertEquals(new COSFloat(4), toCOSArray.get(1)); + assertEquals(new COSFloat(5), toCOSArray.get(2)); + assertEquals(new COSFloat(8), toCOSArray.get(3)); + assertEquals(new COSFloat(2), toCOSArray.get(4)); + assertEquals(new COSFloat(0), toCOSArray.get(5)); + + } + + +} Propchange: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/MatrixTest.java ------------------------------------------------------------------------------ svn:eol-style = native