File tree 1 file changed +12
-1
lines changed
uefi-test-runner/src/proto
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ use uefi:: boot:: { self , OpenProtocolParams } ;
1
2
use uefi:: prelude:: * ;
2
3
use uefi:: proto:: loaded_image:: LoadedImage ;
3
- use uefi:: { boot , proto, Identify } ;
4
+ use uefi:: { proto, Identify } ;
4
5
5
6
pub fn test ( st : & mut SystemTable < Boot > ) {
6
7
info ! ( "Testing various protocols" ) ;
@@ -11,6 +12,7 @@ pub fn test(st: &mut SystemTable<Boot>) {
11
12
find_protocol ( bt) ;
12
13
test_protocols_per_handle ( bt) ;
13
14
test_protocols_per_handle_freestanding ( ) ;
15
+ test_test_protocol_freestanding ( ) ;
14
16
15
17
debug:: test ( bt) ;
16
18
device_path:: test ( bt) ;
@@ -63,6 +65,15 @@ fn test_protocols_per_handle_freestanding() {
63
65
assert ! ( pph. iter( ) . any( |guid| * * guid == LoadedImage :: GUID ) ) ;
64
66
}
65
67
68
+ fn test_test_protocol_freestanding ( ) {
69
+ assert ! ( boot:: test_protocol:: <LoadedImage >( OpenProtocolParams {
70
+ handle: boot:: image_handle( ) ,
71
+ agent: boot:: image_handle( ) ,
72
+ controller: None ,
73
+ } )
74
+ . unwrap( ) ) ;
75
+ }
76
+
66
77
mod console;
67
78
mod debug;
68
79
mod device_path;
You can’t perform that action at this time.
0 commit comments