@@ -286,6 +286,71 @@ class GameStreamTests: XCTestCase {
286286 XCTFail ( )
287287 }
288288 }
289+
290+ func test_combines_thoughts_stream( ) {
291+ let commands = streamCommands ( [
292+ " <pushStream id= \" thoughts \" /><preset id='thought'>[General] Your mind hears Someone thinking, </preset> \" Yup, it works! \" \n " ,
293+ " <popStream/><prompt time= \" 1766284988 \" >></prompt> "
294+ ] )
295+ XCTAssertEqual ( commands. count, 4 )
296+
297+ switch commands [ 3 ] {
298+ case let . text( tags) :
299+ XCTAssertEqual ( tags. count, 2 )
300+ XCTAssertEqual ( tags [ 0 ] . text, " [General] Your mind hears Someone thinking, \" Yup, it works! \" \n " )
301+ default :
302+ XCTFail ( )
303+ }
304+ }
305+
306+ func test_combines_personal_recieve_concise_thoughts_stream( ) {
307+ let commands = streamCommands ( [
308+ " <pushStream id= \" thoughts \" /><preset id='thought'>[Personal][Someone] </preset> \" <to you> \" \" test thought \" \n " ,
309+ " <popStream/><prompt time= \" 1766284988 \" >></prompt> "
310+ ] )
311+ XCTAssertEqual ( commands. count, 4 )
312+
313+ switch commands [ 3 ] {
314+ case let . text( tags) :
315+ XCTAssertEqual ( tags. count, 2 )
316+ XCTAssertEqual ( tags [ 0 ] . text, " [Personal][Someone] \" <to you> \" \" test thought \" \n " )
317+ default :
318+ XCTFail ( )
319+ }
320+ }
321+
322+ func test_combines_personal_recieve_thoughts_stream( ) {
323+ let commands = streamCommands ( [
324+ " <pushStream id= \" thoughts \" /><preset id='thought'>[Personal] Your mind hears Someone thinking, </preset> \" <to you> \" \" test thought \" \n " ,
325+ " <popStream/><prompt time= \" 1766284988 \" >></prompt> "
326+ ] )
327+ XCTAssertEqual ( commands. count, 4 )
328+
329+ switch commands [ 3 ] {
330+ case let . text( tags) :
331+ XCTAssertEqual ( tags. count, 2 )
332+ XCTAssertEqual ( tags [ 0 ] . text, " [Personal] Your mind hears Someone thinking, \" <to you> \" \" test thought \" \n " )
333+ default :
334+ XCTFail ( )
335+ }
336+ }
337+
338+ func test_combines_send_thoughts_stream( ) {
339+ let commands = streamCommands ( [
340+ " <pushStream id= \" thoughts \" /><preset id='thought'>You to Saracus,</preset> \" Yup, it works! \" \n " ,
341+ " <popStream/>You project your thoughts to Saracus. " ,
342+ " <prompt time= \" 1766284988 \" >></prompt> "
343+ ] )
344+ XCTAssertEqual ( commands. count, 5 )
345+
346+ switch commands [ 4 ] {
347+ case let . text( tags) :
348+ XCTAssertEqual ( tags. count, 3 )
349+ XCTAssertEqual ( tags [ 0 ] . text, " You to Saracus, \" Yup, it works! \" \n " )
350+ default :
351+ XCTFail ( )
352+ }
353+ }
289354
290355// func test_urchin_stream() {
291356// let commands = streamCommands([
0 commit comments