diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test index 4de0b39a6e2017ea7fa29575f24a00997dc080f6..e82f6cdb4a3087f2820eb1bef4a03d22fec78d7a 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test @@ -6479,7 +6479,7 @@ numeric(0) [149] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 [186] 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 -##com.oracle.truffle.r.test.builtins.TestBuiltin_asdouble.testasdouble16#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_asdouble.testasdouble16# #argv <- list(structure(28, units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]); [1] 2419200 @@ -6520,7 +6520,7 @@ numeric(0) [1] 9.9e-03 9.9e-02 9.9e-01 9.9e+00 9.9e+01 9.9e+02 9.9e+03 9.9e+04 9.9e+05 [10] 9.9e+06 9.9e+07 9.9e+08 9.9e+09 9.9e+10 -##com.oracle.truffle.r.test.builtins.TestBuiltin_asdouble.testasdouble19#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_asdouble.testasdouble19# #argv <- list(structure(180.958333333333, units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]); [1] 15634800 @@ -6570,7 +6570,7 @@ numeric(0) [1] 9.000 3.000 3.000 6.761 156.678 18.327 11.764 191.640 323.560 [10] 197.210 190.640 -##com.oracle.truffle.r.test.builtins.TestBuiltin_asdouble.testasdouble3#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_asdouble.testasdouble3# #argv <- list(structure(4, tzone = 'GMT', units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]); [1] 345600 @@ -11182,7 +11182,7 @@ V 0.0cwt 0.2cwt 0.4cwt 0.6cwt Victory 69.77324 89.19900 110.36566 118.03233 -##com.oracle.truffle.r.test.builtins.TestBuiltin_c.testc14#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_c.testc14# #options(digits=4);c(0.12345678912345,0.123) [1] 0.1235 0.1230 @@ -22229,7 +22229,7 @@ nonlin NA NA NA 2.526731 2.647712 0.40492879 a 1259 845 719 390 b 1360 1053 774 413 -##com.oracle.truffle.r.test.builtins.TestBuiltin_dir.testdir1#Ignored.Unknown# +##com.oracle.truffle.r.test.builtins.TestBuiltin_dir.testdir1# #argv <- structure(list(path = '.', pattern = 'myTst_.*tar[.]gz$'), .Names = c('path', 'pattern'));do.call('dir', argv) character(0) @@ -24884,7 +24884,7 @@ character(0) #argv <- structure(list(x = structure(integer(0), class = 'AsIs')), .Names = 'x');do.call('format.AsIs', argv) character(0) -##com.oracle.truffle.r.test.builtins.TestBuiltin_formatC.testformatC1#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_formatC.testformatC1# #argv <- list(c(3.14159265358979, 3.1415926535898, 1), 'double', 10, 4L, 'g', '', c(12L, 12L, 12L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]])) [1] " 3.142" " 3.142" " 1" @@ -24926,11 +24926,11 @@ objective "14.1777" #argv <- list(1, 'double', 8, 5, 'g', '-', 13); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]])) [1] "1 " -##com.oracle.truffle.r.test.builtins.TestBuiltin_formatC.testformatC3#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_formatC.testformatC3# #argv <- list(structure(c(1.5, 13.3414265412268, 1e-15, 8, 1, 500, 28), .Dim = c(7L, 1L), .Dimnames = list(c('m.ship.expon.', 'objective', 'tolerance', 'iterations', 'converged', 'maxit', 'n'), ' ')), 'double', 8L, 7L, 'g', '', c(15L, 15L, 15L, 15L, 15L, 15L, 15L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]])) [1] " 1.5" "13.34143" " 1e-15" " 8" " 1" " 500" " 28" -##com.oracle.truffle.r.test.builtins.TestBuiltin_formatC.testformatC4#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_formatC.testformatC4# #argv <- list(c(1000, 1e+07, 1), 'double', 5, 4L, 'g', '', c(12L, 12L, 12L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]])) [1] " 1000" "1e+07" " 1" @@ -25084,7 +25084,7 @@ In gamma(argv[[1]]) : NaNs produced Warning message: In gamma(argv[[1]]) : NaNs produced -##com.oracle.truffle.r.test.builtins.TestBuiltin_gamma.testgamma3#Ignored.Unimplemented# +##com.oracle.truffle.r.test.builtins.TestBuiltin_gamma.testgamma3# #argv <- list(structure(numeric(0), .Dim = c(0L, 0L)));gamma(argv[[1]]); <0 x 0 matrix> @@ -28719,7 +28719,7 @@ FALSE FALSE FALSE [2,] FALSE FALSE FALSE -##com.oracle.truffle.r.test.builtins.TestBuiltin_isinfinite.testisinfinite14#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_isinfinite.testisinfinite14# #argv <- list(structure(c(1, 0.5, 0.5, 1), .Dim = c(2L, 2L), .Dimnames = list(c('A', 'B'), c('A', 'B'))));is.infinite(argv[[1]]); A B A FALSE FALSE @@ -28766,7 +28766,7 @@ FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 66 67 68 69 70 71 FALSE FALSE FALSE FALSE FALSE FALSE -##com.oracle.truffle.r.test.builtins.TestBuiltin_isinfinite.testisinfinite5#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_isinfinite.testisinfinite5# #argv <- list(structure(c(80, 80, 75, 62, 62, 62, 62, 62, 58, 58, 58, 58, 58, 58, 50, 50, 50, 50, 50, 56, 70, 27, 27, 25, 24, 22, 23, 24, 24, 23, 18, 18, 17, 18, 19, 18, 18, 19, 19, 20, 20, 20, 89, 88, 90, 87, 87, 87, 93, 93, 87, 80, 89, 88, 82, 93, 89, 86, 72, 79, 80, 82, 91, 42, 37, 37, 28, 18, 18, 19, 20, 15, 14, 14, 13, 11, 12, 8, 7, 8, 8, 9, 15, 15), .Dim = c(21L, 4L), .Dimnames = list(NULL, c('Air.Flow', 'Water.Temp', 'Acid.Conc.', 'stack.loss'))));is.infinite(argv[[1]]); Air.Flow Water.Temp Acid.Conc. stack.loss [1,] FALSE FALSE FALSE FALSE @@ -31805,14 +31805,14 @@ Error in lgamma(as.raw(1)) : #{ lgamma(c(100, 2.2)) } [1] 359.13420537 0.09694747 -##com.oracle.truffle.r.test.builtins.TestBuiltin_lgamma.testlgamma1#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_lgamma.testlgamma1# #argv <- list(structure(c(2, 1, 1, 1, 3, 1, 1, 1, 4), .Dim = c(3L, 3L)));lgamma(argv[[1]]); [,1] [,2] [,3] [1,] 0 0.0000000 0.000000 [2,] 0 0.6931472 0.000000 [3,] 0 0.0000000 1.791759 -##com.oracle.truffle.r.test.builtins.TestBuiltin_lgamma.testlgamma2#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_lgamma.testlgamma2# #argv <- list(structure(c(2, 3, 2, 1, 4, 4, 7, 2, 11, 11, 15, 10, 7, 8, 13, 12), .Dim = c(4L, 4L), .Dimnames = structure(list(income = c('< 15k', '15-25k', '25-40k', '> 40k'), satisfaction = c('VeryD', 'LittleD', 'ModerateS', 'VeryS')), .Names = c('income', 'satisfaction'))));lgamma(argv[[1]]); satisfaction income VeryD LittleD ModerateS VeryS @@ -31839,7 +31839,7 @@ value out of range in 'lgamma' #argv <- list(numeric(0));lgamma(argv[[1]]); numeric(0) -##com.oracle.truffle.r.test.builtins.TestBuiltin_lgamma.testlgamma7#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_lgamma.testlgamma7# #argv <- list(structure(c(11.4065045686104, 9.40650456861037, 8.40650456861037, 11.4065045686104, 9.40650456861037, 6.40650456861036, 15.4065045686104, 9.40650456861037, 9.40650456861037, 8.40650456861037, 6.40650456861036, 7.40650456861036, 8.40650456861037, 7.40650456861036, 9.40650456861037, 13.4065045686104, 10.4065045686104, 11.4065045686104, 14.4065045686104, 10.4065045686104, 16.4065045686104, 10.4065045686104, 7.40650456861036, 9.40650456861037, 7.40650456861036, 13.4065045686104, 17.4065045686104, 4.40650456861036, 10.4065045686104, 5.40650456861036, 6.40650456861036, 4.40650456861036, 5.40650456861036, 4.40650456861036, 4.40650456861036, 8.40650456861037, 9.40650456861037, 5.40650456861036, 9.40650456861037, 7.40650456861036, 7.40650456861036, 8.40650456861037), .Names = c('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42')));lgamma(argv[[1]]); 1 2 3 4 5 6 7 8 16.068174 11.484342 9.355336 16.068174 11.484342 5.495664 26.283999 11.484342 @@ -32374,7 +32374,7 @@ attr(,"class") [1] 17 -##com.oracle.truffle.r.test.builtins.TestBuiltin_list.testlist3#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_list.testlist3# #argv <- list(x = c(9.5367431640625e-07, 1.9073486328125e-06, 3.814697265625e-06, 7.62939453125e-06, 1.52587890625e-05, 3.0517578125e-05, 6.103515625e-05, 0.0001220703125, 0.000244140625, 0.00048828125, 0.0009765625, 0.001953125, 0.00390625, 0.0078125, 0.015625, 0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024), y = c(3.69420518444359e+25, 2.30887824027777e+24, 1.44304890017492e+23, 9.01905562612606e+21, 5.63690976641081e+20, 35230686042118275072, 2201917878145066496, 137619867512235136, 8601241751556820, 537577617482832, 33598603095309.8, 2099913194115.17, 131244699796.888, 8202825028.58974, 512684387.219832, 32044730.0464007, 2003284.70114408, 125327.674230857, 7863.68742857025, 499.272560819512, 33.2784230289721, 2.7659432263306, 0.488936768533843, -0.282943224311172, 7.32218543045282e-05, -0.00636442868227041, -0.0483709204009262, -0.0704795507649514, 0.0349437746169591, -0.0264830837608839, 0.0200901469411759), xlab = NULL, ylab = NULL);list(argv[[1]],argv[[2]],argv[[3]],argv[[4]]); [[1]] [1] 9.536743e-07 1.907349e-06 3.814697e-06 7.629395e-06 1.525879e-05 @@ -39838,7 +39838,7 @@ Frequency = 1 34 43 45 48 161 TRUE TRUE TRUE TRUE FALSE -##com.oracle.truffle.r.test.builtins.TestBuiltin_operators.testoperators142#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_operators.testoperators142# #argv <- list(structure(list(c(3L, 0L, 1L)), class = c('R_system_version', 'package_version', 'numeric_version')), structure('2.13.2', .Names = 'SweaveListingUtils'));`>`(argv[[1]],argv[[2]]); TRUE @@ -40442,7 +40442,7 @@ data frame with 0 columns and 0 rows [1] NA FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE NA -##com.oracle.truffle.r.test.builtins.TestBuiltin_operators.testoperators20#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_operators.testoperators20# #argv <- list(structure(978350400, class = c('POSIXct', 'POSIXt'), tzone = 'GMT'), c(1605796.39468342, 2250605.34500331, 3464617.14155227, 5492840.71388841, 1219772.31891453, 5433460.81468463, 5713396.02452517, 3996505.04896045, 3804881.73750043, 373683.36378783, 1245734.22899097, 1067815.23929536, 4155114.17658627, 2323059.28775668, 4656000.90815127, 3010085.0161314, 4340156.73798323, 5999048.06153476, 2298452.76521891, 4701988.69854212, 5653097.23772854, 1283037.96871752, 3941322.93728739, 759357.220374048, 1616150.60446411, 2335218.03170443, 80984.7349449992, 2312682.3643595, 5259890.2349174, 2058430.73196709, 2915620.53836882, 3626174.11217093, 2984937.82503158, 1126244.053334, 5003953.83093506, 4042886.83258742, 4803562.677674, 652843.049369752, 4377003.8016513, 2487387.75048405, 4965083.1868127, 3913420.05222291, 4735177.34632641, 3344763.6128068, 3203744.02103573, 4774026.48925781, 141107.11171478, 2886287.43334115, 4429033.49147737, 4189640.45360684, 2888643.47467571, 5208594.91588175, 2649611.30449176, 1480533.93148631, 427466.877132654, 601571.336723864, 1912811.28504127, 3136700.02379268, 4003806.70217425, 2460508.97211581, 5521073.589921, 1775713.19845319, 2776429.51241881, 2010322.98948616, 3936464.58484232, 1560485.48977822, 2894241.66157097, 4634646.93606645, 509525.338098407, 5293943.40406358, 2050713.12808245, 5076935.23793668, 2096741.74243212, 2018670.78146338, 2880972.33020514, 5396015.5351907, 5227525.11837333, 2358656.75892681, 4701235.58655381, 5809817.647174, 2628820.56391239, 4309288.77686709, 2419165.9430936, 1967729.81455922, 4578863.07127029, 1225882.75911659, 4300861.15349829, 735992.738373578, 1484714.53242749, 866704.886756837, 1449278.70250493, 356435.113750398, 3884559.38760191, 5299676.19835585, 4710875.96918643, 4822123.77896905, 2753499.89549071, 2480188.52821738, 4904143.22827756, 3658636.53959334));`+`(argv[[1]],argv[[2]]); [1] "2001-01-20 02:03:16 GMT" "2001-01-27 13:10:05 GMT" [3] "2001-02-10 14:23:37 GMT" "2001-03-06 01:47:20 GMT" @@ -43246,7 +43246,7 @@ attr(,"class")attr(,"package") [205] TRUE TRUE TRUE TRUE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE [217] FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE -##com.oracle.truffle.r.test.builtins.TestBuiltin_operators.testoperators91#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_operators.testoperators91# #argv <- list(structure(list(c(3L, 0L, 1L)), class = c('R_system_version', 'package_version', 'numeric_version')), structure('3.1', .Names = 'gridSVG2'));`<`(argv[[1]],argv[[2]]); TRUE @@ -44037,7 +44037,7 @@ character(0) [218] " 0.43" " 0.36" " 0.36" " 0.06" " 1.00_*" " 0.26" " 0.40" [225] " 0.36" " 0.25" " 0.57_*" " 0.57_*" -##com.oracle.truffle.r.test.builtins.TestBuiltin_paste0.testpaste011#Ignored.ImplementationError# +##com.oracle.truffle.r.test.builtins.TestBuiltin_paste0.testpaste011# #argv <- list(list(character(0), character(0), character(0)), NULL); .Internal(paste0(argv[[1]], argv[[2]])) character(0) @@ -70038,7 +70038,7 @@ attr(,"assign") [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0 0 0 0 0 0 3.952525e-323 0 0 0 0 0 -##com.oracle.truffle.r.test.builtins.TestBuiltin_tdefault.testtdefault14#Ignored.OutputFormatting# +##com.oracle.truffle.r.test.builtins.TestBuiltin_tdefault.testtdefault14# #argv <- list(structure(c(794, 86, 150, 570), .Dim = c(2L, 2L), .Dimnames = structure(list(`1st Survey` = c('Approve', 'Disapprove'), `2nd Survey` = c('Approve', 'Disapprove')), .Names = c('1st Survey', '2nd Survey')))); .Internal(t.default(argv[[1]])) 1st Survey 2nd Survey Approve Disapprove @@ -125359,7 +125359,7 @@ Error in x[[0]] <- c(5) : #{ x <- NULL; x[[1]] <- c(); x; } NULL -##com.oracle.truffle.r.test.library.base.TestSimpleVectors.testNullUpdate#Ignored.Unimplemented# +##com.oracle.truffle.r.test.library.base.TestSimpleVectors.testNullUpdate# #{ x <- NULL; x[[1]] <- c(1,5); x; } [[1]] [1] 1 5 @@ -133018,15 +133018,15 @@ Error in attr(to, which = "a") : external object cannot be attributed #if (!any(R.version$engine == "FastR")) { c("a","b","c") } else { to <- new.external(new.java.class('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass')); c(to$listString) } [1] "a" "b" "c" -##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testCombineInteropTypes#Ignored.Unimplemented# +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testCombineInteropTypes# #if (!any(R.version$engine == "FastR")) { c('a', 'b', 'c', 'a', 'b', 'c') } else { to <- new.external(new.java.class('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass')); c(to$fieldStringArray, to$fieldStringArray) } [1] "a" "b" "c" "a" "b" "c" -##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testCombineInteropTypes#Ignored.Unimplemented# +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testCombineInteropTypes# #if (!any(R.version$engine == "FastR")) { c('a', 'b', 'c', 'a', 'b', 'c') } else { to <- new.external(new.java.class('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass')); c(to$listString, to$listString) } [1] "a" "b" "c" "a" "b" "c" -##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testConvertEmptyList#Ignored.ImplementationError# +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testConvertEmptyList# #if (!any(R.version$engine == "FastR")) { as.character(list()) } else { to <- new.external(new.java.class('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));as.character(to$listEmpty); } character(0) @@ -135414,7 +135414,7 @@ NULL [external object] [1] 1 2 3 -##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNamesForForeignObject#Ignored.ImplementationError# +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNamesForForeignObject#Ignored.Unstable# #if (!any(R.version$engine == "FastR")) { NULL } else { cl <- new.java.class('java.util.Collections'); em<-cl$EMPTY_MAP; names(em) } NULL @@ -135438,7 +135438,7 @@ NULL #if (!any(R.version$engine == "FastR")) { c('field', 'method', 'staticField', 'staticMethod') } else { tc <- new.java.class('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestNamesClass'); t <- new.external(tc); sort(names(t)) } [1] "field" "method" "staticField" "staticMethod" -##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNamesForForeignObject#Ignored.ImplementationError# +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNamesForForeignObject#Ignored.Unstable# #if (!any(R.version$engine == "FastR")) { c('one', 'two') } else { tc <- new.java.class('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestNamesClassMap'); to <- new.external(tc); sort(names(to$m())) } [1] "one" "two" @@ -136303,7 +136303,7 @@ Error: unexpected '[' in "if (!any(R.version$engine == "FastR")) { [" [external object] [1] 1 -##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testToArray#Ignored.Unimplemented# +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testToArray# #if (!any(R.version$engine == "FastR")) { cat('[external object]\n[1] 1\n') } else { a <- as.java.array(1L,,F); a; } [external object] [1] 1 diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asdouble.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asdouble.java index 26624d73a5a4740709d366033340ca864aa05215..4d17ef28c61d8d7b203bd5749af474dd9e950133 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asdouble.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asdouble.java @@ -29,8 +29,7 @@ public class TestBuiltin_asdouble extends TestBase { @Test public void testasdouble3() { - // FIXME FastR outputs 4 (does not handle specially difftime class) - assertEval(Ignored.ImplementationError, "argv <- list(structure(4, tzone = 'GMT', units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]);"); + assertEval("argv <- list(structure(4, tzone = 'GMT', units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]);"); } @Test @@ -95,8 +94,7 @@ public class TestBuiltin_asdouble extends TestBase { @Test public void testasdouble16() { - // FIXME FastR outputs 28 i.e. does not handle specially difftime class - assertEval(Ignored.ImplementationError, "argv <- list(structure(28, units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]);"); + assertEval("argv <- list(structure(28, units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]);"); } @Test @@ -111,8 +109,7 @@ public class TestBuiltin_asdouble extends TestBase { @Test public void testasdouble19() { - // FIXME FastR outputs 180.9583 (does not handle specially difftime class) - assertEval(Ignored.ImplementationError, "argv <- list(structure(180.958333333333, units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]);"); + assertEval("argv <- list(structure(180.958333333333, units = 'days', class = 'difftime'), units = 'secs');as.double(argv[[1]],argv[[2]]);"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_c.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_c.java index 7b4e8cf704f80dfe3d29adf4f62823fe98dfe16a..5b22103fc953e6e333c6a485183a380fdcde63d7 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_c.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_c.java @@ -89,7 +89,7 @@ public class TestBuiltin_c extends TestBase { // FIXME FastR does not honor setting options(digits=ndecimaldigits) // First test is a simplified problem on which the second test would fail too (besides that // it should work fine) - assertEval(Ignored.OutputFormatting, "options(digits=4);c(0.12345678912345,0.123)"); + assertEval("options(digits=4);c(0.12345678912345,0.123)"); assertEval(Ignored.OutputFormatting, "argv <- list(`Grand mean` = structure(103.87323943662, class = 'mtable'), structure(list(N = structure(c(78.7365206866197, 98.5088731171753, 113.842206450509, 123.008873117175), .Dim = 4L, .Dimnames = structure(list(N = c('0.0cwt', '0.2cwt', '0.4cwt', '0.6cwt')), .Names = 'N'), class = 'mtable'), `V:N` = structure(c(79.5323303457107, 86.1989970123773, 69.7732394366197, 98.0323303457106, 108.032330345711, 89.1989970123773, 114.198997012377, 116.698997012377, 110.365663679044, 124.365663679044, 126.365663679044, 118.032330345711), .Dim = 3:4, .Dimnames = structure(list(V = c('Golden.rain', 'Marvellous', 'Victory'), N = c('0.0cwt', '0.2cwt', '0.4cwt', '0.6cwt')), .Names = c('V', 'N')), class = 'mtable')), .Names = c('N', 'V:N')));c(argv[[1]],argv[[2]]);"); } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_dir.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_dir.java index ae7e5d9c4f8d6c185e88c9d1e4ae948a9bffa03b..c5b3d2c970c6cd4399f282a9a4cbf6346b6e20b3 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_dir.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_dir.java @@ -20,6 +20,6 @@ public class TestBuiltin_dir extends TestBase { @Test public void testdir1() { - assertEval(Ignored.Unknown, "argv <- structure(list(path = '.', pattern = 'myTst_.*tar[.]gz$'), .Names = c('path', 'pattern'));do.call('dir', argv)"); + assertEval("argv <- structure(list(path = '.', pattern = 'myTst_.*tar[.]gz$'), .Names = c('path', 'pattern'));do.call('dir', argv)"); } } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_formatC.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_formatC.java index 1561f3af525bd440117f11f77950f755c7d0cad9..3a9706a4c6cf7f6519f2983651e2cee5cb02e1f6 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_formatC.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_formatC.java @@ -19,9 +19,7 @@ public class TestBuiltin_formatC extends TestBase { @Test public void testformatC1() { - // FIXME FastR: the third arg "1" is output into 6 characters instead of 10 - assertEval(Ignored.ImplementationError, - "argv <- list(c(3.14159265358979, 3.1415926535898, 1), 'double', 10, 4L, 'g', '', c(12L, 12L, 12L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]]))"); + assertEval("argv <- list(c(3.14159265358979, 3.1415926535898, 1), 'double', 10, 4L, 'g', '', c(12L, 12L, 12L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]]))"); } @Test @@ -32,16 +30,12 @@ public class TestBuiltin_formatC extends TestBase { @Test public void testformatC3() { - // FIXME Similar problem to testformatC1 - assertEval(Ignored.ImplementationError, - "argv <- list(structure(c(1.5, 13.3414265412268, 1e-15, 8, 1, 500, 28), .Dim = c(7L, 1L), .Dimnames = list(c('m.ship.expon.', 'objective', 'tolerance', 'iterations', 'converged', 'maxit', 'n'), ' ')), 'double', 8L, 7L, 'g', '', c(15L, 15L, 15L, 15L, 15L, 15L, 15L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]]))"); + assertEval("argv <- list(structure(c(1.5, 13.3414265412268, 1e-15, 8, 1, 500, 28), .Dim = c(7L, 1L), .Dimnames = list(c('m.ship.expon.', 'objective', 'tolerance', 'iterations', 'converged', 'maxit', 'n'), ' ')), 'double', 8L, 7L, 'g', '', c(15L, 15L, 15L, 15L, 15L, 15L, 15L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]]))"); } @Test public void testformatC4() { - // FIXME Similar problem to testformatC2 - assertEval(Ignored.ImplementationError, - "argv <- list(c(1000, 1e+07, 1), 'double', 5, 4L, 'g', '', c(12L, 12L, 12L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]]))"); + assertEval("argv <- list(c(1000, 1e+07, 1), 'double', 5, 4L, 'g', '', c(12L, 12L, 12L)); .Internal(formatC(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]]))"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_gamma.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_gamma.java index 5f024ba694c048f9f3866a5866703e92d255ba73..b0e512c4b4decec0e2e06a4191e2ea642b9e1cfd 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_gamma.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_gamma.java @@ -29,8 +29,7 @@ public class TestBuiltin_gamma extends TestBase { @Test public void testgamma3() { - // FIXME RInternalError: not implemented: .Internal beta - assertEval(Ignored.Unimplemented, "argv <- list(structure(numeric(0), .Dim = c(0L, 0L)));gamma(argv[[1]]);"); + assertEval("argv <- list(structure(numeric(0), .Dim = c(0L, 0L)));gamma(argv[[1]]);"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_isinfinite.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_isinfinite.java index 1bb1669b03deb5bb3ece7ddc9551c69d344f21a5..7cd26105452f7fdc7f3c046c90fcc8974694cdcd 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_isinfinite.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_isinfinite.java @@ -39,9 +39,7 @@ public class TestBuiltin_isinfinite extends TestBase { @Test public void testisinfinite5() { - // FIXME FastR output ignores .Dimnames of structure() - assertEval(Ignored.OutputFormatting, - "argv <- list(structure(c(80, 80, 75, 62, 62, 62, 62, 62, 58, 58, 58, 58, 58, 58, 50, 50, 50, 50, 50, 56, 70, 27, 27, 25, 24, 22, 23, 24, 24, 23, 18, 18, 17, 18, 19, 18, 18, 19, 19, 20, 20, 20, 89, 88, 90, 87, 87, 87, 93, 93, 87, 80, 89, 88, 82, 93, 89, 86, 72, 79, 80, 82, 91, 42, 37, 37, 28, 18, 18, 19, 20, 15, 14, 14, 13, 11, 12, 8, 7, 8, 8, 9, 15, 15), .Dim = c(21L, 4L), .Dimnames = list(NULL, c('Air.Flow', 'Water.Temp', 'Acid.Conc.', 'stack.loss'))));is.infinite(argv[[1]]);"); + assertEval("argv <- list(structure(c(80, 80, 75, 62, 62, 62, 62, 62, 58, 58, 58, 58, 58, 58, 50, 50, 50, 50, 50, 56, 70, 27, 27, 25, 24, 22, 23, 24, 24, 23, 18, 18, 17, 18, 19, 18, 18, 19, 19, 20, 20, 20, 89, 88, 90, 87, 87, 87, 93, 93, 87, 80, 89, 88, 82, 93, 89, 86, 72, 79, 80, 82, 91, 42, 37, 37, 28, 18, 18, 19, 20, 15, 14, 14, 13, 11, 12, 8, 7, 8, 8, 9, 15, 15), .Dim = c(21L, 4L), .Dimnames = list(NULL, c('Air.Flow', 'Water.Temp', 'Acid.Conc.', 'stack.loss'))));is.infinite(argv[[1]]);"); } @Test @@ -86,8 +84,7 @@ public class TestBuiltin_isinfinite extends TestBase { @Test public void testisinfinite14() { - // FIXME FastR output ignores .Dimnames of structure() - assertEval(Ignored.OutputFormatting, "argv <- list(structure(c(1, 0.5, 0.5, 1), .Dim = c(2L, 2L), .Dimnames = list(c('A', 'B'), c('A', 'B'))));is.infinite(argv[[1]]);"); + assertEval("argv <- list(structure(c(1, 0.5, 0.5, 1), .Dim = c(2L, 2L), .Dimnames = list(c('A', 'B'), c('A', 'B'))));is.infinite(argv[[1]]);"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_lgamma.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_lgamma.java index 07c3c3cd50696eece024ad4f36b2c210760d2085..8c26d2fcf77a8d06a4f623f76e4d18b4d854e685 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_lgamma.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_lgamma.java @@ -19,15 +19,12 @@ public class TestBuiltin_lgamma extends TestBase { @Test public void testlgamma1() { - // FastR: all numbers on a single line and last number has one extra digit - assertEval(Ignored.OutputFormatting, "argv <- list(structure(c(2, 1, 1, 1, 3, 1, 1, 1, 4), .Dim = c(3L, 3L)));lgamma(argv[[1]]);"); + assertEval("argv <- list(structure(c(2, 1, 1, 1, 3, 1, 1, 1, 4), .Dim = c(3L, 3L)));lgamma(argv[[1]]);"); } @Test public void testlgamma2() { - // FastR: both incorrect output numbers and missing column/row headers - assertEval(Ignored.ImplementationError, - "argv <- list(structure(c(2, 3, 2, 1, 4, 4, 7, 2, 11, 11, 15, 10, 7, 8, 13, 12), .Dim = c(4L, 4L), .Dimnames = structure(list(income = c('< 15k', '15-25k', '25-40k', '> 40k'), satisfaction = c('VeryD', 'LittleD', 'ModerateS', 'VeryS')), .Names = c('income', 'satisfaction'))));lgamma(argv[[1]]);"); + assertEval("argv <- list(structure(c(2, 3, 2, 1, 4, 4, 7, 2, 11, 11, 15, 10, 7, 8, 13, 12), .Dim = c(4L, 4L), .Dimnames = structure(list(income = c('< 15k', '15-25k', '25-40k', '> 40k'), satisfaction = c('VeryD', 'LittleD', 'ModerateS', 'VeryS')), .Names = c('income', 'satisfaction'))));lgamma(argv[[1]]);"); } @Test @@ -52,9 +49,7 @@ public class TestBuiltin_lgamma extends TestBase { @Test public void testlgamma7() { - // FastR output ignores .Names spec in structure() - assertEval(Ignored.OutputFormatting, - "argv <- list(structure(c(11.4065045686104, 9.40650456861037, 8.40650456861037, 11.4065045686104, 9.40650456861037, 6.40650456861036, 15.4065045686104, 9.40650456861037, 9.40650456861037, 8.40650456861037, 6.40650456861036, 7.40650456861036, 8.40650456861037, 7.40650456861036, 9.40650456861037, 13.4065045686104, 10.4065045686104, 11.4065045686104, 14.4065045686104, 10.4065045686104, 16.4065045686104, 10.4065045686104, 7.40650456861036, 9.40650456861037, 7.40650456861036, 13.4065045686104, 17.4065045686104, 4.40650456861036, 10.4065045686104, 5.40650456861036, 6.40650456861036, 4.40650456861036, 5.40650456861036, 4.40650456861036, 4.40650456861036, 8.40650456861037, 9.40650456861037, 5.40650456861036, 9.40650456861037, 7.40650456861036, 7.40650456861036, 8.40650456861037), .Names = c('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42')));lgamma(argv[[1]]);"); + assertEval("argv <- list(structure(c(11.4065045686104, 9.40650456861037, 8.40650456861037, 11.4065045686104, 9.40650456861037, 6.40650456861036, 15.4065045686104, 9.40650456861037, 9.40650456861037, 8.40650456861037, 6.40650456861036, 7.40650456861036, 8.40650456861037, 7.40650456861036, 9.40650456861037, 13.4065045686104, 10.4065045686104, 11.4065045686104, 14.4065045686104, 10.4065045686104, 16.4065045686104, 10.4065045686104, 7.40650456861036, 9.40650456861037, 7.40650456861036, 13.4065045686104, 17.4065045686104, 4.40650456861036, 10.4065045686104, 5.40650456861036, 6.40650456861036, 4.40650456861036, 5.40650456861036, 4.40650456861036, 4.40650456861036, 8.40650456861037, 9.40650456861037, 5.40650456861036, 9.40650456861037, 7.40650456861036, 7.40650456861036, 8.40650456861037), .Names = c('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42')));lgamma(argv[[1]]);"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_list.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_list.java index 6c3c79f941b9ad4465a0b0b6967380ac5454360f..0200332fdae65cbe35d5e3895b1de648f36e03a6 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_list.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_list.java @@ -29,8 +29,7 @@ public class TestBuiltin_list extends TestBase { @Test public void testlist3() { - assertEval(Ignored.OutputFormatting, - "argv <- list(x = c(9.5367431640625e-07, 1.9073486328125e-06, 3.814697265625e-06, 7.62939453125e-06, 1.52587890625e-05, 3.0517578125e-05, 6.103515625e-05, 0.0001220703125, 0.000244140625, 0.00048828125, 0.0009765625, 0.001953125, 0.00390625, 0.0078125, 0.015625, 0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024), y = c(3.69420518444359e+25, 2.30887824027777e+24, 1.44304890017492e+23, 9.01905562612606e+21, 5.63690976641081e+20, 35230686042118275072, 2201917878145066496, 137619867512235136, 8601241751556820, 537577617482832, 33598603095309.8, 2099913194115.17, 131244699796.888, 8202825028.58974, 512684387.219832, 32044730.0464007, 2003284.70114408, 125327.674230857, 7863.68742857025, 499.272560819512, 33.2784230289721, 2.7659432263306, 0.488936768533843, -0.282943224311172, 7.32218543045282e-05, -0.00636442868227041, -0.0483709204009262, -0.0704795507649514, 0.0349437746169591, -0.0264830837608839, 0.0200901469411759), xlab = NULL, ylab = NULL);list(argv[[1]],argv[[2]],argv[[3]],argv[[4]]);"); + assertEval("argv <- list(x = c(9.5367431640625e-07, 1.9073486328125e-06, 3.814697265625e-06, 7.62939453125e-06, 1.52587890625e-05, 3.0517578125e-05, 6.103515625e-05, 0.0001220703125, 0.000244140625, 0.00048828125, 0.0009765625, 0.001953125, 0.00390625, 0.0078125, 0.015625, 0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024), y = c(3.69420518444359e+25, 2.30887824027777e+24, 1.44304890017492e+23, 9.01905562612606e+21, 5.63690976641081e+20, 35230686042118275072, 2201917878145066496, 137619867512235136, 8601241751556820, 537577617482832, 33598603095309.8, 2099913194115.17, 131244699796.888, 8202825028.58974, 512684387.219832, 32044730.0464007, 2003284.70114408, 125327.674230857, 7863.68742857025, 499.272560819512, 33.2784230289721, 2.7659432263306, 0.488936768533843, -0.282943224311172, 7.32218543045282e-05, -0.00636442868227041, -0.0483709204009262, -0.0704795507649514, 0.0349437746169591, -0.0264830837608839, 0.0200901469411759), xlab = NULL, ylab = NULL);list(argv[[1]],argv[[2]],argv[[3]],argv[[4]]);"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_operators.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_operators.java index c37823ed8171ddb1df5fd91911597ce6c04bd992..81dafef3a6aa80aa8da0ddbd86aaca31f810d4ee 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_operators.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_operators.java @@ -121,11 +121,7 @@ public class TestBuiltin_operators extends TestBase { @Test public void testoperators20() { - // FIXME FastR outputs time as 24:05 instead of 00:05 - // Expected: [77] "2001-03-03 00:05:25 GMT" "2001-01-28 19:10:56 GMT" - // FastR: [77] "2001-03-03 24:05:25 GMT" "2001-01-28 19:10:56 GMT" - assertEval(Ignored.ImplementationError, - "argv <- list(structure(978350400, class = c('POSIXct', 'POSIXt'), tzone = 'GMT'), c(1605796.39468342, 2250605.34500331, 3464617.14155227, 5492840.71388841, 1219772.31891453, 5433460.81468463, 5713396.02452517, 3996505.04896045, 3804881.73750043, 373683.36378783, 1245734.22899097, 1067815.23929536, 4155114.17658627, 2323059.28775668, 4656000.90815127, 3010085.0161314, 4340156.73798323, 5999048.06153476, 2298452.76521891, 4701988.69854212, 5653097.23772854, 1283037.96871752, 3941322.93728739, 759357.220374048, 1616150.60446411, 2335218.03170443, 80984.7349449992, 2312682.3643595, 5259890.2349174, 2058430.73196709, 2915620.53836882, 3626174.11217093, 2984937.82503158, 1126244.053334, 5003953.83093506, 4042886.83258742, 4803562.677674, 652843.049369752, 4377003.8016513, 2487387.75048405, 4965083.1868127, 3913420.05222291, 4735177.34632641, 3344763.6128068, 3203744.02103573, 4774026.48925781, 141107.11171478, 2886287.43334115, 4429033.49147737, 4189640.45360684, 2888643.47467571, 5208594.91588175, 2649611.30449176, 1480533.93148631, 427466.877132654, 601571.336723864, 1912811.28504127, 3136700.02379268, 4003806.70217425, 2460508.97211581, 5521073.589921, 1775713.19845319, 2776429.51241881, 2010322.98948616, 3936464.58484232, 1560485.48977822, 2894241.66157097, 4634646.93606645, 509525.338098407, 5293943.40406358, 2050713.12808245, 5076935.23793668, 2096741.74243212, 2018670.78146338, 2880972.33020514, 5396015.5351907, 5227525.11837333, 2358656.75892681, 4701235.58655381, 5809817.647174, 2628820.56391239, 4309288.77686709, 2419165.9430936, 1967729.81455922, 4578863.07127029, 1225882.75911659, 4300861.15349829, 735992.738373578, 1484714.53242749, 866704.886756837, 1449278.70250493, 356435.113750398, 3884559.38760191, 5299676.19835585, 4710875.96918643, 4822123.77896905, 2753499.89549071, 2480188.52821738, 4904143.22827756, 3658636.53959334));`+`(argv[[1]],argv[[2]]);"); + assertEval("argv <- list(structure(978350400, class = c('POSIXct', 'POSIXt'), tzone = 'GMT'), c(1605796.39468342, 2250605.34500331, 3464617.14155227, 5492840.71388841, 1219772.31891453, 5433460.81468463, 5713396.02452517, 3996505.04896045, 3804881.73750043, 373683.36378783, 1245734.22899097, 1067815.23929536, 4155114.17658627, 2323059.28775668, 4656000.90815127, 3010085.0161314, 4340156.73798323, 5999048.06153476, 2298452.76521891, 4701988.69854212, 5653097.23772854, 1283037.96871752, 3941322.93728739, 759357.220374048, 1616150.60446411, 2335218.03170443, 80984.7349449992, 2312682.3643595, 5259890.2349174, 2058430.73196709, 2915620.53836882, 3626174.11217093, 2984937.82503158, 1126244.053334, 5003953.83093506, 4042886.83258742, 4803562.677674, 652843.049369752, 4377003.8016513, 2487387.75048405, 4965083.1868127, 3913420.05222291, 4735177.34632641, 3344763.6128068, 3203744.02103573, 4774026.48925781, 141107.11171478, 2886287.43334115, 4429033.49147737, 4189640.45360684, 2888643.47467571, 5208594.91588175, 2649611.30449176, 1480533.93148631, 427466.877132654, 601571.336723864, 1912811.28504127, 3136700.02379268, 4003806.70217425, 2460508.97211581, 5521073.589921, 1775713.19845319, 2776429.51241881, 2010322.98948616, 3936464.58484232, 1560485.48977822, 2894241.66157097, 4634646.93606645, 509525.338098407, 5293943.40406358, 2050713.12808245, 5076935.23793668, 2096741.74243212, 2018670.78146338, 2880972.33020514, 5396015.5351907, 5227525.11837333, 2358656.75892681, 4701235.58655381, 5809817.647174, 2628820.56391239, 4309288.77686709, 2419165.9430936, 1967729.81455922, 4578863.07127029, 1225882.75911659, 4300861.15349829, 735992.738373578, 1484714.53242749, 866704.886756837, 1449278.70250493, 356435.113750398, 3884559.38760191, 5299676.19835585, 4710875.96918643, 4822123.77896905, 2753499.89549071, 2480188.52821738, 4904143.22827756, 3658636.53959334));`+`(argv[[1]],argv[[2]]);"); } @Test @@ -497,9 +493,7 @@ public class TestBuiltin_operators extends TestBase { @Test public void testoperators91() { - // GnuR outputs "TRUE" not "[1] TRUE" - assertEval(Ignored.OutputFormatting, - "argv <- list(structure(list(c(3L, 0L, 1L)), class = c('R_system_version', 'package_version', 'numeric_version')), structure('3.1', .Names = 'gridSVG2'));`<`(argv[[1]],argv[[2]]);"); + assertEval("argv <- list(structure(list(c(3L, 0L, 1L)), class = c('R_system_version', 'package_version', 'numeric_version')), structure('3.1', .Names = 'gridSVG2'));`<`(argv[[1]],argv[[2]]);"); } @Test @@ -762,9 +756,7 @@ public class TestBuiltin_operators extends TestBase { @Test public void testoperators142() { - // FIXME FastR output ignores .Tsp attribute of structure() - assertEval(Ignored.OutputFormatting, - "argv <- list(structure(list(c(3L, 0L, 1L)), class = c('R_system_version', 'package_version', 'numeric_version')), structure('2.13.2', .Names = 'SweaveListingUtils'));`>`(argv[[1]],argv[[2]]);"); + assertEval("argv <- list(structure(list(c(3L, 0L, 1L)), class = c('R_system_version', 'package_version', 'numeric_version')), structure('2.13.2', .Names = 'SweaveListingUtils'));`>`(argv[[1]],argv[[2]]);"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_paste0.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_paste0.java index 85f5157879cc2ed0ae5d067ad6148f2a4c5157a3..eac30ba19df7bc8ae3bc39ccbc2bc94974a45a18 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_paste0.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_paste0.java @@ -59,10 +59,7 @@ public class TestBuiltin_paste0 extends TestBase { @Test public void testpaste011() { - // FIXME: - // FastR output: '[1] ""' - // GnuR output: 'character(0)' - assertEval(Ignored.ImplementationError, "argv <- list(list(character(0), character(0), character(0)), NULL); .Internal(paste0(argv[[1]], argv[[2]]))"); + assertEval("argv <- list(list(character(0), character(0), character(0)), NULL); .Internal(paste0(argv[[1]], argv[[2]]))"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_tdefault.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_tdefault.java index f6045b8e001c3a0f2f79630db2d08c6c6d087add..a5c28d6e0256d4db78209ff9e55b8c256b176b97 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_tdefault.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_tdefault.java @@ -84,9 +84,7 @@ public class TestBuiltin_tdefault extends TestBase { @Test public void testtdefault14() { - // FIXME FastR output ignores .Dimnames of structure() - assertEval(Ignored.OutputFormatting, - "argv <- list(structure(c(794, 86, 150, 570), .Dim = c(2L, 2L), .Dimnames = structure(list(`1st Survey` = c('Approve', 'Disapprove'), `2nd Survey` = c('Approve', 'Disapprove')), .Names = c('1st Survey', '2nd Survey')))); .Internal(t.default(argv[[1]]))"); + assertEval("argv <- list(structure(c(794, 86, 150, 570), .Dim = c(2L, 2L), .Dimnames = structure(list(`1st Survey` = c('Approve', 'Disapprove'), `2nd Survey` = c('Approve', 'Disapprove')), .Names = c('1st Survey', '2nd Survey')))); .Internal(t.default(argv[[1]]))"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleVectors.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleVectors.java index 4e95a79254c9b05192b6beecbf72e31b2b77f024..12fcf8471a70b6c76502e3a88c596c2f8c138723 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleVectors.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleVectors.java @@ -2186,7 +2186,7 @@ public class TestSimpleVectors extends TestBase { assertEval(Output.IgnoreErrorMessage, "{ x <- NULL; x[[c(1,0)]] <- c(1,5); x; }"); assertEval(Output.IgnoreErrorMessage, "{ x <- NULL; x[[c(1,2)]] <- c(1,5); x; }"); - assertEval(Ignored.Unimplemented, "{ x <- NULL; x[[1]] <- c(1,5); x; }"); + assertEval("{ x <- NULL; x[[1]] <- c(1,5); x; }"); } @Test diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java index d4a38ca6e5459e25a78ca77e2c6caba9a508303b..0937c523d565d2f6b4ef685470977b6bbb0f5379 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java @@ -193,7 +193,7 @@ public class TestJavaInterop extends TestBase { assertEvalFastR("tc <- new.java.class('" + TEST_CLASS + "'); to <- new.external(tc); a <- as.java.array(c(to, to)); java.class(a);", "[Lcom.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass;"); - assertEvalFastR(Ignored.Unimplemented, "a <- as.java.array(1L,,F); a;", getRValue(new int[]{1})); + assertEvalFastR("a <- as.java.array(1L,,F); a;", getRValue(new int[]{1})); } @Test @@ -348,8 +348,8 @@ public class TestJavaInterop extends TestBase { TestClass t = new TestClass(); assertEvalFastR(Ignored.Unimplemented, CREATE_TRUFFLE_OBJECT + " c(to$fieldStringArray)", toRVector(t.fieldStringArray, null)); assertEvalFastR(Ignored.Unimplemented, CREATE_TRUFFLE_OBJECT + " c(to$listString)", toRVector(t.listString, null)); - assertEvalFastR(Ignored.Unimplemented, CREATE_TRUFFLE_OBJECT + " c(to$fieldStringArray, to$fieldStringArray)", "c('a', 'b', 'c', 'a', 'b', 'c')"); - assertEvalFastR(Ignored.Unimplemented, CREATE_TRUFFLE_OBJECT + " c(to$listString, to$listString)", "c('a', 'b', 'c', 'a', 'b', 'c')"); + assertEvalFastR(CREATE_TRUFFLE_OBJECT + " c(to$fieldStringArray, to$fieldStringArray)", "c('a', 'b', 'c', 'a', 'b', 'c')"); + assertEvalFastR(CREATE_TRUFFLE_OBJECT + " c(to$listString, to$listString)", "c('a', 'b', 'c', 'a', 'b', 'c')"); } @Test @@ -522,8 +522,8 @@ public class TestJavaInterop extends TestBase { // Note: The following two tests fails on Solaris. It seems that the Java interop on // Solaris treats the two inner classes SimpleImmutableEntry and SimpleEntry of // java.util.AbstractMap as if they were members. - assertEvalFastR(Ignored.ImplementationError, "cl <- new.java.class('java.util.Collections'); em<-cl$EMPTY_MAP; names(em)", "NULL"); - assertEvalFastR(Ignored.ImplementationError, "tc <- new.java.class('" + TestNamesClassMap.class.getName() + "'); to <- new.external(tc); sort(names(to$m()))", "c('one', 'two')"); + assertEvalFastR(Ignored.Unstable, "cl <- new.java.class('java.util.Collections'); em<-cl$EMPTY_MAP; names(em)", "NULL"); + assertEvalFastR(Ignored.Unstable, "tc <- new.java.class('" + TestNamesClassMap.class.getName() + "'); to <- new.external(tc); sort(names(to$m()))", "c('one', 'two')"); } @Test @@ -832,7 +832,7 @@ public class TestJavaInterop extends TestBase { @Test public void testConvertEmptyList() throws IllegalArgumentException { - assertEvalFastR(Ignored.ImplementationError, CREATE_TRUFFLE_OBJECT + "as.character(to$listEmpty);", "as.character(list())"); + assertEvalFastR(CREATE_TRUFFLE_OBJECT + "as.character(to$listEmpty);", "as.character(list())"); } @Test