File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ 2022-10-27 Kevin Ushey <
[email protected] >
2
+
3
+ * inst/tinytest/cpp/coerce.cpp: add coerce unit tests
4
+ * inst/tinytest/test_coerce.R: idem
5
+
1
6
2022-10-12 Dirk Eddelbuettel <
[email protected] >
2
7
3
8
* DESCRIPTION (Version, Date): Roll minor version
Original file line number Diff line number Diff line change
1
+ // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
2
+ //
3
+ // coerce.cpp: Rcpp R/C++ interface class library -- coerce unit tests
4
+ //
5
+ // Copyright (C) 2022 Dirk Eddelbuettel and Kevin Ushey
6
+ //
7
+ // This file is part of Rcpp.
8
+ //
9
+ // Rcpp is free software: you can redistribute it and/or modify it
10
+ // under the terms of the GNU General Public License as published by
11
+ // the Free Software Foundation, either version 2 of the License, or
12
+ // (at your option) any later version.
13
+ //
14
+ // Rcpp is distributed in the hope that it will be useful, but
15
+ // WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ // GNU General Public License for more details.
18
+ //
19
+ // You should have received a copy of the GNU General Public License
20
+ // along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
21
+
22
+ #include < Rcpp.h>
23
+ using namespace Rcpp ;
24
+
25
+ // [[Rcpp::export]]
26
+ std::string coerce_raw_to_string (Rbyte x) {
27
+ return internal::coerce_to_string<RAWSXP>(x);
28
+ }
Original file line number Diff line number Diff line change
1
+
2
+ # # Copyright (C) 2022 Dirk Eddelbuettel and Kevin Ushey
3
+ # #
4
+ # # This file is part of Rcpp.
5
+ # #
6
+ # # Rcpp is free software: you can redistribute it and/or modify it
7
+ # # under the terms of the GNU General Public License as published by
8
+ # # the Free Software Foundation, either version 2 of the License, or
9
+ # # (at your option) any later version.
10
+ # #
11
+ # # Rcpp is distributed in the hope that it will be useful, but
12
+ # # WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # # GNU General Public License for more details.
15
+ # #
16
+ # # You should have received a copy of the GNU General Public License
17
+ # # along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+ if (Sys.getenv(" RunAllRcppTests" ) != " yes" ) exit_file(" Set 'RunAllRcppTests' to 'yes' to run." )
20
+
21
+ Rcpp :: sourceCpp(" cpp/coerce.cpp" )
22
+
23
+ expect_equal(coerce_raw_to_string(0xaa ), " aa" )
You can’t perform that action at this time.
0 commit comments