mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-19 15:10:51 +00:00
8ced905843
* claim: #7535 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Vendor accesskit_macos 0.26.3 as published (#7535) The published package, unchanged, so the next commit shows the fix as a diff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * macOS: quitting on a Mac with a Touch Bar no longer crashes (#7535) eframe's accessibility adapter (accesskit_macos 0.26.3) swaps the window's view to a subclass of its own. When AppKit's Touch Bar observes the first responder (nextResponder), key-value observing subclasses the view again. Dropping the adapter on quit reset the view's class, which threw away KVO's subclass, so AppKit's removal of its observer raised NSRangeException ("not registered as an observer") and the app ended with EXC_BREAKPOINT. accesskit_macos 0.27.2 fixes this (AccessKit/accesskit#835), but egui 0.36 is on accesskit 0.24, so vendor 0.26.3 with 0.27.2's src/subclass.rs and its tests: the adapter leaves the class alone when KVO subclassed the view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.1 KiB
Rust
39 lines
1.1 KiB
Rust
// Copyright 2026 The AccessKit Authors. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0 (found in
|
|
// the LICENSE-APACHE file) or the MIT license (found in
|
|
// the LICENSE-MIT file), at your option.
|
|
|
|
use libtest_mimic::{Arguments, Trial};
|
|
use std::process::ExitCode;
|
|
|
|
pub struct Test {
|
|
pub name: &'static str,
|
|
pub run: fn(),
|
|
}
|
|
|
|
macro_rules! tests {
|
|
($($name:ident),* $(,)?) => {
|
|
&[$($crate::harness::Test { name: stringify!($name), run: $name }),*]
|
|
};
|
|
}
|
|
pub(crate) use tests;
|
|
|
|
pub fn run(suites: &[(&str, &[Test])]) -> ExitCode {
|
|
let mut args = Arguments::from_args();
|
|
// libtest-mimic only runs tests on the main thread when it uses a single thread.
|
|
args.test_threads = Some(1);
|
|
let trials = suites
|
|
.iter()
|
|
.flat_map(|(suite, tests)| {
|
|
tests.iter().map(move |test| {
|
|
let run = test.run;
|
|
Trial::test(format!("{suite}::{}", test.name), move || {
|
|
run();
|
|
Ok(())
|
|
})
|
|
})
|
|
})
|
|
.collect();
|
|
libtest_mimic::run(&args, trials).exit_code()
|
|
}
|