Home
last modified time | relevance | path

Searched refs:assert_eq (Results 1 – 19 of 19) sorted by relevance

/frameworks/native/libs/binder/rust/tests/
Dserialization.rs44 macro_rules! assert_eq { macro
115 assert_eq!(parcel.read::<Vec<bool>>()?, unsafe { bindings::TESTDATA_BOOL }); in on_transact()
116 assert_eq!(parcel.read::<Option<Vec<bool>>>()?, None); in on_transact()
125 assert_eq!(parcel.read::<i8>()?, 0); in on_transact()
126 assert_eq!(parcel.read::<i8>()?, 1); in on_transact()
127 assert_eq!(parcel.read::<i8>()?, i8::max_value()); in on_transact()
129 assert_eq!(parcel.read::<Vec<i8>>()?, unsafe { bindings::TESTDATA_I8 }); in on_transact()
131 assert_eq!(parcel.read::<Vec<u8>>()?, unsafe { bindings::TESTDATA_U8 }); in on_transact()
132 assert_eq!(parcel.read::<Option<Vec<i8>>>()?, None); in on_transact()
144 assert_eq!(parcel.read::<u16>()?, 0); in on_transact()
[all …]
Dintegration.rs430 assert_eq!( in check_get_service()
434 assert_eq!( in check_get_service()
440 assert_eq!(binder::get_interface::<dyn ITest>("manager").err(), Some(StatusCode::BAD_TYPE)); in check_get_service()
441 assert_eq!( in check_get_service()
454 assert_eq!( in check_get_service_async()
458 assert_eq!( in check_get_service_async()
466 assert_eq!( in check_get_service_async()
470 assert_eq!( in check_get_service_async()
483 assert_eq!( in check_check_service()
487 assert_eq!( in check_check_service()
[all …]
/frameworks/native/libs/binder/rust/src/
Dparcel.rs714 assert_eq!(parcel.read::<bool>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
715 assert_eq!(parcel.read::<i8>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
716 assert_eq!(parcel.read::<u16>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
717 assert_eq!(parcel.read::<i32>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
718 assert_eq!(parcel.read::<u32>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
719 assert_eq!(parcel.read::<i64>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
720 assert_eq!(parcel.read::<u64>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
721 assert_eq!(parcel.read::<f32>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
722 assert_eq!(parcel.read::<f64>(), Err(StatusCode::NOT_ENOUGH_DATA)); in test_read_write()
723 assert_eq!(parcel.read::<Option<String>>(), Ok(None)); in test_read_write()
[all …]
Derror.rs470 assert_eq!(status.exception_code(), ExceptionCode::SERVICE_SPECIFIC); in make_service_specific_error()
471 assert_eq!(status.service_specific_error(), -42); in make_service_specific_error()
472 assert_eq!( in make_service_specific_error()
483 assert_eq!(status.exception_code(), ExceptionCode::ILLEGAL_STATE); in make_exception()
484 assert_eq!(status.service_specific_error(), 0); in make_exception()
485 assert_eq!(status.get_description(), "Status(-5, EX_ILLEGAL_STATE): 'message'".to_string()); in make_exception()
493 assert_eq!(status.exception_code(), ExceptionCode::ILLEGAL_STATE); in make_exception_null()
494 assert_eq!(status.service_specific_error(), 0); in make_exception_null()
495 assert_eq!(status.get_description(), "Status(-5, EX_ILLEGAL_STATE): ''".to_string()); in make_exception_null()
505 assert_eq!(status.exception_code(), ExceptionCode::SERVICE_SPECIFIC); in convert_to_service_specific_exception()
[all …]
/frameworks/native/libs/binder/trusty/rust/binder_rpc_test/
Dmain.rs52 assert_eq!(expected, count.unwrap()); in expect_sessions()
59 assert_eq!(unsafe { clock_gettime(CLOCK_REALTIME, &mut ts) }, 0); in get_time_ns()
71 assert_eq!(srv.as_binder().ping_binder(), Ok(()));
75 assert_eq!(srv.sendString("Foo"), Ok(()));
79 assert_eq!(srv.doubleString("Foo"), Ok(String::from("FooFoo")));
85 assert_eq!(srv.doubleString(&single), Ok(String::from(single.clone() + &single)));
98 assert_eq!(result, Ok(0));
106 assert_eq!(result.unwrap().unwrap(), in_binder);
115 assert_eq!(out_binder.unwrap().unwrap(), in_binder);
131 assert_eq!(binder, held);
[all …]
/frameworks/native/services/inputflinger/rust/
Dsticky_keys_filter.rs306 assert_eq!(test_filter.last_event().unwrap(), event); in test_notify_key_passes_non_ephemeral_modifier_keys()
309 assert_eq!(test_filter.last_event().unwrap(), event); in test_notify_key_passes_non_ephemeral_modifier_keys()
323 assert_eq!(test_filter.last_event().unwrap(), event); in test_notify_key_passes_non_modifier_keys()
327 assert_eq!(test_filter.last_event().unwrap(), event); in test_notify_key_passes_non_modifier_keys()
352 assert_eq!(test_callbacks.get_last_modifier_state(), ModifierState::None); in test_modifier_state_updated_on_modifier_key_press()
353 assert_eq!(test_callbacks.get_last_locked_modifier_state(), ModifierState::None); in test_modifier_state_updated_on_modifier_key_press()
356 assert_eq!(test_callbacks.get_last_modifier_state(), test_state.1); in test_modifier_state_updated_on_modifier_key_press()
357 assert_eq!(test_callbacks.get_last_locked_modifier_state(), ModifierState::None); in test_modifier_state_updated_on_modifier_key_press()
361 assert_eq!(test_callbacks.get_last_modifier_state(), test_state.1); in test_modifier_state_updated_on_modifier_key_press()
362 assert_eq!(test_callbacks.get_last_locked_modifier_state(), ModifierState::None); in test_modifier_state_updated_on_modifier_key_press()
[all …]
Dbounce_keys_filter.rs163 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_external_keyboard()
167 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_external_keyboard()
180 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_external_keyboard()
194 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_internal_keyboard()
198 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_internal_keyboard()
202 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_internal_keyboard()
217 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_external_stylus()
222 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_external_stylus()
227 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_doesnt_block_for_external_stylus()
244 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_multiple_external_keyboards()
[all …]
Dslow_keys_filter.rs256 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_internal_keyboard_not_blocked()
274 assert_eq!(next.last_event().unwrap(), event); in test_is_notify_key_for_external_stylus_not_blocked()
298 assert_eq!( in test_notify_key_for_external_keyboard_when_key_pressed_for_threshold_time()
317 assert_eq!( in test_notify_key_for_external_keyboard_when_key_pressed_for_threshold_time()
Dinput_filter.rs234 assert_eq!(test_callbacks.last_event().unwrap(), event); in test_notify_key_with_no_filters()
247 assert_eq!(test_filter.last_event().unwrap(), event); in test_notify_key_with_filter()
/frameworks/native/libs/input/rust/
Dkeyboard_classifier.rs185 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::Alphabetic); in classify_external_alphabetic_keyboard()
194 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::NonAlphabetic); in classify_external_non_alphabetic_keyboard()
207 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::NonAlphabetic); in classify_mouse_pretending_as_keyboard()
220 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::NonAlphabetic); in classify_touchpad_pretending_as_keyboard()
233 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::NonAlphabetic); in classify_stylus_pretending_as_keyboard()
246 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::NonAlphabetic); in classify_dpad_pretending_as_keyboard()
259 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::NonAlphabetic); in classify_joystick_pretending_as_keyboard()
272 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::NonAlphabetic); in classify_gamepad_pretending_as_keyboard()
285 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::NonAlphabetic); in reclassify_keyboard_on_alphabetic_key_event()
290 assert_eq!(classifier.get_keyboard_type(DEVICE_ID), KeyboardType::Alphabetic); in reclassify_keyboard_on_alphabetic_key_event()
[all …]
/frameworks/native/libs/nativewindow/rust/src/
Dlib.rs153 assert_eq!(status, 0, "id() failed for AHardwareBuffer with error code: {status}"); in id()
317 assert_eq!(status, 0); in from_raw_allows_getters()
322 assert_eq!(buffer.width(), 1024); in from_raw_allows_getters()
336 assert_eq!(buffer.width(), 1024); in basic_getters()
337 assert_eq!(buffer.height(), 512); in basic_getters()
338 assert_eq!(buffer.layers(), 1); in basic_getters()
339 assert_eq!(buffer.format(), AHardwareBuffer_Format::AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM); in basic_getters()
340 assert_eq!( in basic_getters()
372 assert_eq!(buffer, buffer2); in clone()
391 assert_eq!(remade_buffer, buffer2); in into_raw()
/frameworks/native/libs/binder/rust/src/parcel/
Dparcelable.rs1246 assert_eq!(custom2.0, 123_456_789); in test_custom_parcelable()
1248 assert_eq!(custom2.2, custom.2); in test_custom_parcelable()
1249 assert_eq!(custom2.3, custom.3); in test_custom_parcelable()
1268 assert_eq!(parcel.read::<u32>().unwrap(), 4); in test_slice_parcelables()
1269 assert_eq!(parcel.read::<u32>().unwrap(), 1); in test_slice_parcelables()
1270 assert_eq!(parcel.read::<u32>().unwrap(), 0); in test_slice_parcelables()
1271 assert_eq!(parcel.read::<u32>().unwrap(), 0); in test_slice_parcelables()
1272 assert_eq!(parcel.read::<u32>().unwrap(), 1); in test_slice_parcelables()
1281 assert_eq!(vec, [true, false, false, true]); in test_slice_parcelables()
1296 assert_eq!(parcel.read::<u32>().unwrap(), 4); // 4 items in test_slice_parcelables()
[all …]
/frameworks/native/libs/debugstore/rust/src/
Dstorage.rs63 assert_eq!(sum, 7, "The sum of the elements should be equal to the inserted value."); in test_insert_and_retrieve()
74 assert_eq!( in test_fold_functionality()
88 assert_eq!(first_sum, 8, "The sum of the elements should be equal to the inserted values."); in test_insert_and_retrieve_multiple_values()
94 assert_eq!( in test_insert_and_retrieve_multiple_values()
107 assert_eq!(sum, 4, "The sum of the elements should be equal to the inserted values."); in test_storage_limit()
132 assert_eq!(count, 100, "Storage should be filled to its limit with concurrent insertions."); in test_concurrent_insertions()
Dcore.rs176 assert_eq!( in test_end_event()
/frameworks/native/libs/bufferstreams/rust/src/
Dlib.rs219 assert_eq!(publisher.pending_requests(), 1); in test_test_implementations_next()
224 assert_eq!(publisher.pending_requests(), 0); in test_test_implementations_next()
/frameworks/native/libs/bufferstreams/rust/src/buffers/
Dbuffer.rs78 assert_eq!(buffer_id, buffer.id()); in test_get_buffer_id()
/frameworks/native/libs/bufferstreams/rust/src/publishers/
Dbuffer_pool_publisher.rs106 assert_eq!(buffer_pool_publisher.subscription.pending_requests(), 0); in test_send_next_frame()
/frameworks/native/cmds/evemu-record/
Devdev.rs189 assert_eq!(buf.pop().unwrap(), 0, "buf is not a null-terminated string"); in name()
/frameworks/native/libs/binder/trusty/rust/binder_rpc_test/service/
Dmain.rs155 assert_eq!(unsafe { nanosleep(&ts, &mut rem) }, 0); in sleepMs()