Package net.sf.latexdraw.parsers.ps

Examples of net.sf.latexdraw.parsers.ps.PSFunctionParser


    new PSFunctionParser("x"); //$NON-NLS-1$
  }

  @SuppressWarnings("unused") @Test
  public void testPSFunctionParserPopOk() throws InvalidFormatPSFunctionException {
    new PSFunctionParser("pop"); //$NON-NLS-1$
  }
View Full Code Here


  }


  @SuppressWarnings("unused") @Test
  public void testPSFunctionParserSubOk() throws InvalidFormatPSFunctionException {
    new PSFunctionParser("sub"); //$NON-NLS-1$
  }
View Full Code Here

    new PSFunctionParser("sub"); //$NON-NLS-1$
  }

  @Test
  public void testPSFunctionParserValueOk() throws InvalidFormatPSFunctionException {
    PSFunctionParser parser = new PSFunctionParser("2.3"); //$NON-NLS-1$
    assertEquals(2.3,parser.getY(0),0.0);
  }
View Full Code Here

    assertEquals(2.3,parser.getY(0),0.0);
  }

  @Test
  public void testGetYX() throws InvalidFormatPSFunctionException {
    PSFunctionParser parser = new PSFunctionParser("x"); //$NON-NLS-1$
    assertEquals(2.0,parser.getY(2),0.0);
  }
View Full Code Here

    assertEquals(2.0,parser.getY(2),0.0);
  }

  @Test
  public void testGetYSinX() throws InvalidFormatPSFunctionException {
    PSFunctionParser parser = new PSFunctionParser("x sin"); //$NON-NLS-1$
    assertEquals(Math.sin(Math.toRadians(2.0)),parser.getY(2),0.0);
  }
View Full Code Here

    assertEquals(Math.sin(Math.toRadians(2.0)),parser.getY(2),0.0);
  }

  @Test
  public void testGetYXAdd2() throws InvalidFormatPSFunctionException {
    PSFunctionParser parser = new PSFunctionParser("x 2 add"); //$NON-NLS-1$
    assertEquals(5.0,parser.getY(3),0.0);
  }
View Full Code Here

    assertEquals(5.0,parser.getY(3),0.0);
  }

  @Test(expected=InvalidFormatPSFunctionException.class)
  public void testGetYXAdd_notOK() throws InvalidFormatPSFunctionException {
    PSFunctionParser parser = new PSFunctionParser("x add"); //$NON-NLS-1$
    parser.getY(3);
  }
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.parsers.ps.PSFunctionParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.