Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 20, 2023
1 parent 01e33e0 commit ceaf619
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ jobs:
runs-on: ${{ matrix.os || 'ubuntu-latest' }}

strategy:
fail-fast: false
matrix:
include:
- name: Test GNUStep with libobjc2 v1.9
Expand Down Expand Up @@ -719,7 +720,7 @@ jobs:
run: cargo install cargo-fuzz --version=^0.11.2

- name: Test Foundation
run: cargo test $ARGS --features=$INTERESTING_FEATURES,catch-all,Foundation_all -- --test-threads=1 --nocapture
run: cargo test $ARGS --features=$INTERESTING_FEATURES,catch-all,Foundation_all,exception -- --test-threads=1 --nocapture

- name: Test all frameworks
if: ${{ env.FULL }}
Expand Down
14 changes: 11 additions & 3 deletions crates/objc2/src/declare/ivar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,18 @@ mod tests {
let _: () = unsafe { msg_send![&mut obj, setFoo: 42u32] };

std::println!("convert {:p}, {:p}", obj, &*obj);
let obj = unsafe { Id::as_ptr(&obj).cast::<IvarTestObject>().as_ref().unwrap() };
std::println!("access {:p}, {:p}", &obj.inner, &obj.foo);
assert_eq!(*obj.foo, 42);
let obj_ref = unsafe { Id::as_ptr(&obj).cast::<IvarTestObject>().as_ref().unwrap() };
std::println!("access {:p}, {:p}", &obj_ref.inner, &obj_ref.foo);
assert_eq!(*obj_ref.foo, 42);
std::println!("drop");
#[cfg(feature = "exception")]
unsafe {
let obj = std::panic::AssertUnwindSafe(obj);
crate::exception::catch(|| drop(obj)).unwrap()
};
#[cfg(not(feature = "exception"))]
drop(obj);
std::println!("after drop");
}

#[test]
Expand Down

0 comments on commit ceaf619

Please sign in to comment.