//  Copyright © 2015 Rob Rix. All rights reserved.

final class NaturalTests: XCTestCase {
	func testZeroTypechecksAsNatural() {
		assert(zero.inferType(context).right, ==, "Natural")
	}

	func testSuccessorOfZeroTypechecksAsNatural() {
		let typechecked = Term(.Application(Term("successor"), Term("zero"))).out.inferType(context)
		assert(typechecked.right, ==, "Natural")
	}
}

private let module = Expression<Term>.natural
private let context = module.context

private let zero = Term("zero").out


import Assertions
import Manifold
import XCTest

//  Copyright © 2015 Rob Rix. All rights reserved.

final class NaturalTests: XCTestCase {
	func testZeroTypechecksAsNatural() {
		assert(zero.checkType("Natural", context: context), ==, "Natural")
		assert(zero.inferType(context), ==, "Natural")
	}

	func testSuccessorOfZeroTypechecksAsNatural() {
		assert(Term(.Application(Term("successor"), Term("zero"))).out.inferType(context), ==, "Natural")
	}
}

private let module = Expression<Term>.natural
private let context = module.context

private let zero = Term("zero").out


import Assertions
import Manifold
import XCTest

Test Natural using the error logging assertion.
Test Natural using the error logging assertion.
