blob: 45533a701962f8c1f37d78135013bc6ea521bbe8 [file] [log] [blame]
Hasini Gunasinghe46df15b2024-08-13 01:09:32 +00001/*
2 * Copyright (C) 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17//! Test for asserting the non-existence of an IAuthMgrAuthorization.aidl
18
19#![cfg(test)]
20
21use binder;
22
23const AUTHMGR_INTERFACE_NAME: &str = "android.hardware.security.see.authmgr.IAuthMgrAuthorization";
24
25#[test]
26fn test_authmgr_non_existence() {
27 let authmgr_instances = match binder::get_declared_instances(AUTHMGR_INTERFACE_NAME) {
28 Ok(vec) => vec,
29 Err(e) => {
30 panic!("failed to retrieve the declared interfaces for AuthMgr: {:?}", e);
31 }
32 };
33 assert!(authmgr_instances.is_empty());
34}