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

Capture and play voice with Asterisk ARI -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -