@@ -25,11 +25,14 @@ func TestBrowserConversions(t *testing.T) {
2525	defer  cancel ()
2626
2727	buildForTests (t , ctx )
28+ 
29+ 	// Register the test cases that should be logged. 
30+ 	registerContractEventTest ()
2831	registerOrderEventTest ("EmptyContractEvents" , 0 )
2932	registerOrderEventTest ("ExchangeFillContractEvent" , 1 )
3033	registerSignedOrderTest ("NullAssetData" )
3134	registerSignedOrderTest ("NonNullAssetData" )
32- 	registerContractEventTest ( )
35+ 	registerValidationResultsTest ( "emptyValidationResults" ,  0 ,  0 )
3336
3437	// Start a simple HTTP server to serve the web page for the browser node. 
3538	ts  :=  httptest .NewServer (http .FileServer (http .Dir ("../../dist" )))
@@ -249,6 +252,12 @@ func registerOrderEventSignedOrder(description string) {
249252	registerOrderEventField (description , boilerplate + "salt" )
250253}
251254
255+ // FIXME(jalextowle): Generalize for non-empty validation results 
256+ func  registerValidationResultsTest (description  string , _acceptedLength  int , _rejectedLength  int ) {
257+ 	registerValidationResultsField (description , "accepted | length" )
258+ 	registerValidationResultsField (description , "rejected | length" )
259+ }
260+ 
252261func  registerOrderEventField (description  string , field  string ) {
253262	registerTest (fmt .Sprintf ("(orderEventTest | %s | %s)" , description , field ))
254263}
@@ -257,6 +266,10 @@ func registerSignedOrderField(description string, field string) {
257266	registerTest (fmt .Sprintf ("(signedOrderTest | %s | %s)" , description , field ))
258267}
259268
269+ func  registerValidationResultsField (description  string , field  string ) {
270+ 	registerTest (fmt .Sprintf ("(validationResultsTest | %s | %s)" , description , field ))
271+ }
272+ 
260273func  registerTest (test  string ) {
261274	testCases  =  append (testCases , fmt .Sprintf ("\" %s: true\" " , test ))
262275}
0 commit comments