From 7076fda54230a95897b57d7e3611c20d38bb6f83 Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Fri, 13 Oct 2017 16:35:31 +0300 Subject: [PATCH] JS: added back integration test for @BeforeTest and @AfterTest annotations The test was removed in e5cfd198c7c8b82f08b0f6e8cbe5e22ed56cbaa9 in order to prevent gradle tests from crashing when running with the old compiler. --- .../kotlin.test/js/it/src/test/kotlin/MainTest.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libraries/kotlin.test/js/it/src/test/kotlin/MainTest.kt b/libraries/kotlin.test/js/it/src/test/kotlin/MainTest.kt index 83a37cc49ef..51286c6ecc6 100644 --- a/libraries/kotlin.test/js/it/src/test/kotlin/MainTest.kt +++ b/libraries/kotlin.test/js/it/src/test/kotlin/MainTest.kt @@ -1,13 +1,23 @@ import kotlin.test.* +var value = 5 + class SimpleTest { + @BeforeTest fun beforeFun() { + value *= 2 + } + + @AfterTest fun afterFun() { + value /= 2 + } + @Test fun testFoo() { - assertNotEquals(10, foo()) + assertNotEquals(value, foo()) } @Test fun testBar() { - assertEquals(10, foo()) + assertEquals(value, foo()) } @Ignore @Test fun testFooWrong() {