PageRenderTime 27ms CodeModel.GetById 19ms app.highlight 7ms RepoModel.GetById 0ms app.codeStats 0ms

/libformula-1.1.3/test/org/pentaho/reporting/libraries/formula/function/information/IsNaFunctionTest.java

#
Java | 45 lines | 19 code | 6 blank | 20 comment | 0 complexity | c5a411f81d4aab1190833d5f4626eed4 MD5 | raw file
Possible License(s): LGPL-2.1
 1/*
 2 * This program is free software; you can redistribute it and/or modify it under the
 3 * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software
 4 * Foundation.
 5 *
 6 * You should have received a copy of the GNU Lesser General Public License along with this
 7 * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
 8 * or from the Free Software Foundation, Inc.,
 9 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU Lesser General Public License for more details.
14 *
15 * Copyright (c) 2006 - 2009 Pentaho Corporation and Contributors.  All rights reserved.
16 */
17
18package org.pentaho.reporting.libraries.formula.function.information;
19
20import org.pentaho.reporting.libraries.formula.FormulaTestBase;
21
22
23/**
24 * @author Cedric Pronzato
25 */
26public class IsNaFunctionTest extends FormulaTestBase
27{
28  public void testDefault() throws Exception
29  {
30    runDefaultTest();
31  }
32
33  public Object[][] createDataTest()
34  {
35    return new Object[][]
36        {
37            {"ISNA(1/0)", Boolean.FALSE},
38            {"ISNA(NA())", Boolean.TRUE},
39            //{"ISNA(#N/A)", Boolean.TRUE},
40            {"ISNA(\"#N/A\")", Boolean.FALSE},
41            {"ISNA(1)", Boolean.FALSE},
42        };
43  }
44
45}