Skip to content

Commit 33df5da

Browse files
Merge pull request #422 from theseus-rs/impl-continuationsupport-issupported
feat: implement jdk/internal/vm/ContinuationSupport.isSupported0()Z
2 parents 9ab4663 + d291e8c commit 33df5da

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ristretto_vm/src/intrinsic_methods/jdk/internal/vm/continuationsupport.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,21 @@ pub(crate) async fn is_supported_0(
1717
_thread: Arc<Thread>,
1818
_parameters: Parameters,
1919
) -> Result<Option<Value>> {
20-
todo!("jdk.internal.vm.ContinuationSupport.isSupported0()Z")
20+
Ok(Some(Value::from(false)))
2121
}
2222

2323
#[cfg(test)]
2424
mod tests {
2525
use super::*;
2626

2727
#[tokio::test]
28-
#[should_panic(
29-
expected = "not yet implemented: jdk.internal.vm.ContinuationSupport.isSupported0()Z"
30-
)]
31-
async fn test_is_supported_0() {
28+
async fn test_is_supported_0() -> Result<()> {
3229
let (_vm, thread) = crate::test::thread().await.expect("thread");
33-
let _ = is_supported_0(thread, Parameters::default()).await;
30+
let value = is_supported_0(thread, Parameters::default())
31+
.await?
32+
.expect("continuations support");
33+
let supports_continuations: bool = value.try_into()?;
34+
assert!(!supports_continuations);
35+
Ok(())
3436
}
3537
}

0 commit comments

Comments
 (0)