package ua.ansymo.hintco.test

import org.junit.Test
import ua.ansymo.hintco.Main

import static org.junit.Assert.*

class ExampleTest {
	
	@Test
	def void ComputeOperationOrderSimpleTest(){
		assertTrue(true)
	}
	
	@Test
	def void Test2(){
		assertTrue(2 + 3 == 5)
	}
	
	@Test
	def void MapWithNullTest(){
		val vals = #[1,2,3,4,5]
		val res = vals.map[i | if (i==4) null else i]
		assertEquals(5, res.size)
		val resNonNull = vals.map[i | if (i==4) null else i].filter[i | i!==null]
		assertEquals(4, resNonNull.size)
	}
	
	@Test
	def void DiagnosticsTest(){
		Main.run_diagnostics()
	}
	
}