Skip to content

Commit 26561d5

Browse files
committed
Merged origin/main into jdblischak-update-3e-vignettes
2 parents 50bdc24 + ca8fe6a commit 26561d5

File tree

16 files changed

+37
-18
lines changed

16 files changed

+37
-18
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
push:
99
branches: [main, master]
1010
pull_request:
11-
branches: [main, master]
1211

1312
name: R-CMD-check.yaml
1413

.github/workflows/pkgdown.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87
release:
98
types: [published]
109
workflow_dispatch:

.github/workflows/test-coverage.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87

98
name: test-coverage.yaml
109

@@ -35,14 +34,16 @@ jobs:
3534
clean = FALSE,
3635
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3736
)
37+
print(cov)
3838
covr::to_cobertura(cov)
3939
shell: Rscript {0}
4040

41-
- uses: codecov/codecov-action@v4
41+
- uses: codecov/codecov-action@v5
4242
with:
43-
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44-
file: ./cobertura.xml
45-
plugin: noop
43+
# Fail if error if not on PR, or if on PR and token is given
44+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
45+
files: ./cobertura.xml
46+
plugins: noop
4647
disable_search: true
4748
token: ${{ secrets.CODECOV_TOKEN }}
4849

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ Config/testthat/parallel: true
5656
Config/testthat/start-first: watcher, parallel*
5757
Encoding: UTF-8
5858
Roxygen: list(markdown = TRUE, r6 = FALSE)
59-
RoxygenNote: 7.3.2.9000
59+
RoxygenNote: 7.3.2

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# testthat (development version)
22

3+
* Fixed an issue preventing compilation from succeeding due to deprecation / removal of `std::uncaught_exception()` (@kevinushey, #2047).
4+
35
# testthat 3.2.3
46

57
* Fixed an issue where `expect_no_error(1)` was failing (#2037).

R/expect-known.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,5 @@ expect_known_hash <- function(object, hash = NULL) {
215215
}
216216

217217
all_utf8 <- function(x) {
218-
! any(is.na(iconv(x, "UTF-8", "UTF-8")))
218+
!anyNA(iconv(x, "UTF-8", "UTF-8"))
219219
}

R/mock2.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ local_mocked_bindings <- function(..., .package = NULL, .env = caller_env()) {
144144
local_bindings_rebind(!!!bindings, .env = test_env, .frame = .env)
145145
}
146146

147-
if (any(!bindings_found)) {
147+
if (!all(bindings_found)) {
148148
missing <- names(bindings)[!bindings_found]
149149
cli::cli_abort("Can't find binding for {.arg {missing}}")
150150
}

R/praise.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ praise <- function() {
2121
"\U0001f9ff Your tests look perfect \U0001f9ff",
2222
"\U0001f3af Your tests hit the mark \U0001f3af",
2323
"\U0001f41d Your tests are the bee's knees \U0001f41d",
24-
"\U0001f4a3 Your tests are da bomb \U0001f4a3",
25-
"\U0001f525 Your tests are lit \U0001f525"
24+
"\U0001f3b8 Your tests rock \U0001f3b8",
25+
"\U0001f44f Your tests get an ovation \U0001f44f"
2626
)
2727

2828
x <- if (cli::is_utf8_output()) c(plain, utf8) else plain

R/reporter-list.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ all_passed <- function(res) {
126126
}
127127

128128
df <- as.data.frame.testthat_results(res)
129-
sum(df$failed) == 0 && all(!df$error)
129+
sum(df$failed) == 0 && !any(df$error)
130130
}
131131

132132
any_warnings <- function(res) {

inst/include/testthat/vendor/catch.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,15 @@
379379

380380
namespace Catch {
381381

382+
inline bool HasUncaughtException()
383+
{
384+
#if __cplusplus >= 202002L
385+
return std::uncaught_exceptions() > 0;
386+
#else
387+
return std::uncaught_exception();
388+
#endif
389+
}
390+
382391
struct IConfig;
383392

384393
struct CaseSensitive { enum Choice {
@@ -8379,7 +8388,7 @@ namespace Catch {
83798388
{}
83808389

83818390
ScopedMessage::~ScopedMessage() {
8382-
if ( !std::uncaught_exception() ){
8391+
if ( !HasUncaughtException() ){
83838392
getResultCapture().popScopedMessage(m_info);
83848393
}
83858394
}
@@ -8702,7 +8711,7 @@ namespace Catch {
87028711
Section::~Section() {
87038712
if( m_sectionIncluded ) {
87048713
SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() );
8705-
if( std::uncaught_exception() )
8714+
if( HasUncaughtException() )
87068715
getResultCapture().sectionEndedEarly( endInfo );
87078716
else
87088717
getResultCapture().sectionEnded( endInfo );

0 commit comments

Comments
 (0)