scala - Is there a better way to check if a number should be inside a range, in scalatest? -


say wanna check if result (an integer) should >=4 , <=15, can write such assertion in scalatest test:

assert(num >= 4) assert(num <= 15) 

it works can improved in opinion. there better way check in scalatest?

this maybe: assert(4 5 contains res.toint)?


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

c# - Can I intercept a SOAP response in .NET before a content type binding mismatch ProtocolException? -

css - Can I use the :after pseudo-element on an input field? -