#
# 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)
prod.foo <- function(...) 41
Math.bar <- function(...) 44
Summary.bar <- function(...) 45
test.prod.1 <- function() assertThat(prod(NULL), identicalTo(1))
test.prod.2 <- function() assertThat(prod(logical(0)), identicalTo(1))
test.prod.3 <- function() assertThat(prod(c(TRUE, TRUE, FALSE, FALSE, TRUE)), identicalTo(0))
test.prod.4 <- function() assertThat(prod(c(TRUE, TRUE, TRUE)), identicalTo(1))
test.prod.5 <- function() assertThat(prod(c(TRUE, TRUE, NA)), identicalTo(NA_real_))
test.prod.6 <- function() assertThat(prod(c(FALSE, FALSE, FALSE, FALSE)), identicalTo(0))
test.prod.7 <- function() assertThat(prod(c(FALSE, FALSE, FALSE, FALSE, NA)), identicalTo(NA_real_))
test.prod.8 <- function() assertThat(prod(c(NA, NA, NA)), identicalTo(NA_real_))
test.prod.9 <- function() assertThat(prod(structure(c(TRUE, FALSE), .Names = c("a", "b"))), identicalTo(0))
test.prod.10 <- function() assertThat(prod(integer(0)), identicalTo(1))
test.prod.11 <- function() assertThat(prod(structure(integer(0), .Names = character(0))), identicalTo(1))
test.prod.12 <- function() assertThat(prod(c(NA_integer_, NA_integer_, NA_integer_)), identicalTo(NA_real_))
test.prod.13 <- function() assertThat(prod(1:3), identicalTo(6))
test.prod.14 <- function() assertThat(prod(c(1L, NA, 4L, NA, 999L)), identicalTo(NA_real_))
test.prod.15 <- function() assertThat(prod(c(1L, 2L, 1073741824L, 1073741824L)), identicalTo(2305843009213693952, tol = 0.000100))
test.prod.16 <- function() assertThat(prod(structure(1:2, .Names = c("a", "b"))), identicalTo(2))
test.prod.17 <- function() assertThat(prod(numeric(0)), identicalTo(1))
test.prod.18 <- function() assertThat(prod(structure(numeric(0), .Names = character(0))), identicalTo(1))
test.prod.19 <- function() assertThat(prod(c(NA_real_, NA_real_)), identicalTo(NA_real_))
test.prod.20 <- function() assertThat(prod(c(3.14159, 6.28319, 9.42478, 12.5664, 15.708)), identicalTo(36722.5382750787, tol = 0.000100))
test.prod.21 <- function() assertThat(prod(c(-3.14159, -6.28319, -9.42478, -12.5664, -15.708)), identicalTo(-36722.5382750787, tol = 0.000100))
test.prod.22 <- function() assertThat(prod(c(1.5, 2.5)), identicalTo(3.75, tol = 0.000100))
test.prod.23 <- function() assertThat(prod(c(1.5, NA)), identicalTo(NA_real_))
test.prod.24 <- function() assertThat(prod(c(1.5, NaN)), identicalTo(NaN))
test.prod.25 <- function() assertThat(prod(c(Inf, -1.5)), identicalTo(-Inf))
test.prod.26 <- function() assertThat(prod(c(-Inf, -1.5)), identicalTo(Inf))
test.prod.27 <- function() assertThat(prod(c(Inf, 1.5)), identicalTo(Inf))
test.prod.28 <- function() assertThat(prod(c(Inf, -1.5)), identicalTo(-Inf))
test.prod.29 <- function() assertThat(prod(structure(c(1.5, 2.5), .Names = c("a", "b"))), identicalTo(3.75, tol = 0.000100))
test.prod.30 <- function() assertThat(prod(character(0)), throwsError())
test.prod.31 <- function() assertThat(prod(c(NA_character_, NA_character_)), throwsError())
test.prod.32 <- function() assertThat(prod(structure(character(0), .Names = character(0))), throwsError())
test.prod.33 <- function() assertThat(prod(c("a", "b")), throwsError())
test.prod.34 <- function() assertThat(prod(c("4.1", "blahh", "99.9", "-413", NA)), throwsError())
test.prod.35 <- function() assertThat(prod(structure(c("4.1", "99.9"), .Names = c("a", "b"))), throwsError())
test.prod.36 <- function() assertThat(prod(c("TRUE", "TRUE", "FALSE")), throwsError())
test.prod.37 <- function() assertThat(prod(c("true", "false", "true")), throwsError())
test.prod.38 <- function() assertThat(prod(c("true", "false", "true")), throwsError())
test.prod.39 <- function() assertThat(prod(complex(0)), identicalTo(1+0i))
test.prod.40 <- function() assertThat(prod(c(NA_complex_, NA_complex_, NA_complex_)), identicalTo(NA_complex_))
test.prod.41 <- function() assertThat(prod(structure(complex(0), .Named = character(0))), identicalTo(1+0i))
test.prod.42 <- function() assertThat(prod(c(1+3i, 4+6i, 1-3i)), identicalTo(40+60i))
test.prod.43 <- function() assertThat(prod(structure(1:12, .Dim = 3:4)), identicalTo(479001600))
test.prod.44 <- function() assertThat(prod(structure(1:3, rando.attrib = 941L)), identicalTo(6))
test.prod.45 <- function() assertThat(prod(structure(1:3, .Dim = 3L, .Dimnames = list(c("a", "b", "c")))), identicalTo(6))
test.prod.46 <- function() assertThat(prod(structure("foo", class = "foo")), identicalTo(41))
test.prod.47 <- function() assertThat(prod(structure(list(1L, "bar"), class = "bar")), identicalTo(45))
