| // Copyright 2016 PDFium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #include "fpdfsdk/javascript/PublicMethods.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| #include "testing/test_support.h" |
| TEST(CJS_PublicMethods, IsNumber) { |
| // TODO(weili): Check whether results from case 0, 1, 10, 15 are intended. |
| // Content with invalid characters. |
| // Numbers with whitespaces. |
| for (size_t i = 0; i < FX_ArraySize(test_data); ++i) { |
| EXPECT_EQ(test_data[i].expected, |
| CJS_PublicMethods::IsNumber(test_data[i].input)) |