#
# Renjin : JVM-based interpreter for the R language for the statistical analysis
# Copyright Â© 2010-2019 BeDataDriven Groep B.V. and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, a copy is available at
# https://www.gnu.org/licenses/gpl-2.0.txt
#

# Generated by gen-summary-tests.R using GNU R version 3.3.1 (2016-06-21)
library(hamcrest)
cumprod.foo <- function(...) 41
Math.bar <- function(...) 44
Summary.bar <- function(...) 45
test.cumprod.1 <- function() assertThat(cumprod(NULL), identicalTo(numeric(0)))
test.cumprod.2 <- function() assertThat(cumprod(logical(0)), identicalTo(numeric(0)))
test.cumprod.3 <- function() assertThat(cumprod(c(TRUE, TRUE, FALSE, FALSE, TRUE)), identicalTo(c(1, 1, 0, 0, 0)))
test.cumprod.4 <- function() assertThat(cumprod(c(TRUE, TRUE, TRUE)), identicalTo(c(1, 1, 1)))
test.cumprod.5 <- function() assertThat(cumprod(c(TRUE, TRUE, NA)), identicalTo(c(1, 1, NA)))
test.cumprod.6 <- function() assertThat(cumprod(c(FALSE, FALSE, FALSE, FALSE)), identicalTo(c(0, 0, 0, 0)))
test.cumprod.7 <- function() assertThat(cumprod(c(FALSE, FALSE, FALSE, FALSE, NA)), identicalTo(c(0, 0, 0, 0, NA)))
test.cumprod.8 <- function() assertThat(cumprod(c(NA, NA, NA)), identicalTo(c(NA_real_, NA_real_, NA_real_)))
test.cumprod.9 <- function() assertThat(cumprod(structure(c(TRUE, FALSE), .Names = c("a", "b"))), identicalTo(structure(c(1, 0), .Names = c("a", "b"))))
test.cumprod.10 <- function() assertThat(cumprod(integer(0)), identicalTo(numeric(0)))
test.cumprod.11 <- function() assertThat(cumprod(structure(integer(0), .Names = character(0))), identicalTo(structure(numeric(0), .Names = character(0))))
test.cumprod.12 <- function() assertThat(cumprod(c(NA_integer_, NA_integer_, NA_integer_)), identicalTo(c(NA_real_, NA_real_, NA_real_)))
test.cumprod.13 <- function() assertThat(cumprod(1:3), identicalTo(c(1, 2, 6)))
test.cumprod.14 <- function() assertThat(cumprod(c(1L, NA, 4L, NA, 999L)), identicalTo(c(1, NA, NA, NA, NA)))
test.cumprod.15 <- function() assertThat(cumprod(c(1L, 2L, 1073741824L, 1073741824L)), identicalTo(c(1, 2, 2147483648, 2305843009213693952), tol = 0.000100))
test.cumprod.16 <- function() assertThat(cumprod(structure(1:2, .Names = c("a", "b"))), identicalTo(structure(c(1, 2), .Names = c("a", "b"))))
test.cumprod.17 <- function() assertThat(cumprod(numeric(0)), identicalTo(numeric(0)))
test.cumprod.18 <- function() assertThat(cumprod(structure(numeric(0), .Names = character(0))), identicalTo(structure(numeric(0), .Names = character(0))))
test.cumprod.19 <- function() assertThat(cumprod(c(NA_real_, NA_real_)), identicalTo(c(NA_real_, NA_real_)))
test.cumprod.20 <- function() assertThat(cumprod(c(3.14159, 6.28319, 9.42478, 12.5664, 15.708)), identicalTo(c(3.14159, 19.7392068721, 186.037682144031, 2337.82392889475, 36722.5382750787), tol = 0.000100))
test.cumprod.21 <- function() assertThat(cumprod(c(-3.14159, -6.28319, -9.42478, -12.5664, -15.708)), identicalTo(c(-3.14159, 19.7392068721, -186.037682144031, 2337.82392889475, -36722.5382750787), tol = 0.000100))
test.cumprod.22 <- function() assertThat(cumprod(c(1.5, 2.5)), identicalTo(c(1.5, 3.75), tol = 0.000100))
test.cumprod.23 <- function() assertThat(cumprod(c(1.5, NA)), identicalTo(c(1.5, NA), tol = 0.000100))
test.cumprod.24 <- function() assertThat(cumprod(c(1.5, NaN)), identicalTo(c(1.5, NaN), tol = 0.000100))
test.cumprod.25 <- function() assertThat(cumprod(c(Inf, -1.5)), identicalTo(c(Inf, -Inf)))
test.cumprod.26 <- function() assertThat(cumprod(c(-Inf, -1.5)), identicalTo(c(-Inf, Inf)))
test.cumprod.27 <- function() assertThat(cumprod(c(Inf, 1.5)), identicalTo(c(Inf, Inf)))
test.cumprod.28 <- function() assertThat(cumprod(c(Inf, -1.5)), identicalTo(c(Inf, -Inf)))
test.cumprod.29 <- function() assertThat(cumprod(structure(c(1.5, 2.5), .Names = c("a", "b"))), identicalTo(structure(c(1.5, 3.75), .Names = c("a", "b")), tol = 0.000100))
test.cumprod.30 <- function() assertThat(cumprod(character(0)), identicalTo(numeric(0)))
test.cumprod.31 <- function() assertThat(cumprod(c(NA_character_, NA_character_)), identicalTo(c(NA_real_, NA_real_)))
test.cumprod.32 <- function() assertThat(cumprod(structure(character(0), .Names = character(0))), identicalTo(structure(numeric(0), .Names = character(0))))
test.cumprod.33 <- function() assertThat(cumprod(c("a", "b")), identicalTo(c(NA_real_, NA_real_)))
test.cumprod.34 <- function() assertThat(cumprod(c("4.1", "blahh", "99.9", "-413", NA)), identicalTo(c(4.1, NA, NA, NA, NA), tol = 0.000100))
test.cumprod.35 <- function() assertThat(cumprod(structure(c("4.1", "99.9"), .Names = c("a", "b"))), identicalTo(structure(c(4.1, 409.59), .Names = c("a", "b")), tol = 0.000100))
test.cumprod.36 <- function() assertThat(cumprod(c("TRUE", "TRUE", "FALSE")), identicalTo(c(NA_real_, NA_real_, NA_real_)))
test.cumprod.37 <- function() assertThat(cumprod(c("true", "false", "true")), identicalTo(c(NA_real_, NA_real_, NA_real_)))
test.cumprod.38 <- function() assertThat(cumprod(c("true", "false", "true")), identicalTo(c(NA_real_, NA_real_, NA_real_)))
test.cumprod.39 <- function() assertThat(cumprod(complex(0)), identicalTo(complex(0)))
test.cumprod.40 <- function() assertThat(cumprod(c(NA_complex_, NA_complex_, NA_complex_)), identicalTo(c(NA_complex_, NA_complex_, NA_complex_)))
test.cumprod.41 <- function() assertThat(cumprod(structure(complex(0), .Named = character(0))), identicalTo(complex(0)))
test.cumprod.42 <- function() assertThat(cumprod(c(1+3i, 4+6i, 1-3i)), identicalTo(c(1+3i, -14+18i, 40+60i)))
test.cumprod.43 <- function() assertThat(cumprod(structure(1:12, .Dim = 3:4)), identicalTo(c(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600)))
test.cumprod.44 <- function() assertThat(cumprod(structure(1:3, rando.attrib = 941L)), identicalTo(c(1, 2, 6)))
test.cumprod.45 <- function() assertThat(cumprod(structure(1:3, .Dim = 3L, .Dimnames = list(c("a", "b", "c")))), identicalTo(structure(c(1, 2, 6), .Names = c("a", "b", "c"))))
test.cumprod.46 <- function() assertThat(cumprod(structure("foo", class = "foo")), identicalTo(41))
test.cumprod.47 <- function() assertThat(cumprod(structure(list(1L, "bar"), class = "bar")), identicalTo(44))
