Nim
#
Versions- 1.0
#
Test FrameworksTests are currently executed using the following:
# tests.nim
import unittest, codewars_output
addOutputFormatter(OutputFormatter(newCodewarsOutputFormatter()))
import solution
include solution_tests
The custom output formatter is open sourced at Codewars/nim-unittest.
#
Using Preloaded CodePreloaded
proc f*(x, y: int): int = x + y
Solution
import setup # required
proc add*(x, y, z: int): int = f(x, y) + z
Tests
suite "add(x, y, z) using preloaded f(x, y)":
test "works":
check(add(1, 1, 1) == 3)
#
Timeout12 seconds
#
PackagesNone
#
ServicesNone
#
Language IDnim