You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add the receiver's possible states to the error context #10
The VS Code State Machine view needs the states the receiver can be in at a failing call, so it can split them into the states the call accepts and the states it rejects (liquid-java/vscode-liquidjava#158).
Given:
P: the states the receiver can be in, from the Found condition;
A: the states the call accepts, from the Expected condition (expectedStates).
The view shows Valid = P ∩ A and Invalid = P \ A.
actualStates only covers some forms of Found and is not documented as P. A dedicated field states exactly what the view relies on.
Proposal
Add possibleStates to StateMachineErrorContext: the states, in state set order, that the receiver's Found premises allow. Use the same evaluation as expectedStates (||, !, ternaries), and intersect across conjoined premises. When nothing is known about the receiver, return every state.
Tests
DatagramSocket after if (exit) socket.close(); else socket.send(p); then socket.receive(p). Found is flag ? closed(socket) : bound(socket), so P = {bound, closed} and A = {unbound, bound, connected}. This is the vscode-liquidjava test example E_OSS_A1_22_UdpChatClient.
A negated Found, such as !closed(s).
The existing DefaultMutableTreeNode and Door fixtures.
Activity