Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ut optional within UtExpressionCompositeMatcher not working as expected #68

Open
JustinChilton opened this issue Oct 25, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@JustinChilton
Copy link
Contributor

I would expect the ut optional token to work even if there are not the same number of arguments (because that arg would be optional). Below is an example that I would expect to pass.

Names Default To Here( 0 );
ut global reporter = ut streaming log reporter();
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
gb = dt << Run Script( "Graph Builder Smoother Line" );
ut assert that(
	Expr( gb << get script ),
	ut expression matches(
		Expr(
			Graph Builder(
				ut optional( size( ut wild(), ut wild() ) ),
				Show Control Panel( 0 ),
				Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
				Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
			)
		)
	)
);

I wrote this matcher a long time ago, so I am not sure what the behavior was meant to be, but I think it is supposed to support this.

@emccorkle emccorkle added the bug Something isn't working label Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants