File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ public void ItLoadsModuleFromEmbeddedResource()
1616
1717 using var host = new Host ( ) ;
1818 host . LoadModule ( "hello.wasm" , stream ) . Should ( ) . NotBeNull ( ) ;
19+
20+ // `LoadModule` is not supposed to close the supplied stream,
21+ // so the following statement should complete without throwing
22+ // `ObjectDisposedException`
23+ stream . Read ( new byte [ 0 ] , 0 , 0 ) ;
1924 }
2025
2126 [ Fact ]
@@ -26,6 +31,11 @@ public void ItLoadsModuleTextFromEmbeddedResource()
2631
2732 using var host = new Host ( ) ;
2833 host . LoadModuleText ( "hello.wat" , stream ) . Should ( ) . NotBeNull ( ) ;
34+
35+ // `LoadModuleText` is not supposed to close the supplied stream,
36+ // so the following statement should complete without throwing
37+ // `ObjectDisposedException`
38+ stream . Read ( new byte [ 0 ] , 0 , 0 ) ;
2939 }
3040 }
3141}
You can’t perform that action at this time.
0 commit comments