Java: Make a testcase for wrappers of sources.

This commit is contained in:
Michael Nebel
2022-02-28 15:14:51 +01:00
parent 66fe0e74b5
commit 24640c3670
2 changed files with 5 additions and 0 deletions

View File

@@ -2,3 +2,4 @@
| p;Sources;true;socketStream;();;ReturnValue;remote |
| p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[0].ArrayElement;remote |
| p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[1].Element;remote |
| p;Sources;true;wrappedSocketStream;();;ReturnValue;remote |

View File

@@ -19,6 +19,10 @@ public class Sources {
return socket.accept().getInputStream();
}
public InputStream wrappedSocketStream() throws IOException {
return socketStream();
}
public void sourceToParameter(InputStream[] streams, List<InputStream> otherStreams) throws IOException {
ServerSocket socket = new ServerSocket(123);
streams[0] = socket.accept().getInputStream();