Commit d34cbe3d authored by Drew's avatar Drew

Fixing tests

parent f7817f77
;; Copyright (c) 2016 Anarchy Tools Contributors.
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; http:;;www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
(package
:name "atpkg"
:configurations {
:bootstrap {
:yes {
:atpkg {
:bootstrapOnly true
:llbuildyaml "bootstrap/bootstrap-macosx-atpkg.swift-build"
}
}
}
}
:tasks {
:atpkg {
:tool "atllbuild"
:source ["src/**.swift"]
:name "atpkg"
:outputType "static-library"
}
:atpkg-tests {
:tool "atllbuild"
:dependencies ["atpkg"]
:source ["tests/**.swift"]
:name "atpkgtests"
:outputType "executable"
:linkWithProduct ["atpkg.a"]
}
:run-atpkg-tests {
:tool "shell"
:dependencies ["atpkg-tests"]
:script "./.atllbuild/products/atpkgtests"
}
:run-tests {
:dependencies ["run-atpkg-tests"]
:tool "nop" }
}
)
......@@ -25,14 +25,14 @@ class PackageTests: Test {
let filename = __FILE__
static func testBasic() throws {
let filepath = "./atpkg/tests/collateral/basic.atpkg"
let filepath = "./tests/collateral/basic.atpkg"
guard let parser = Parser(filepath: filepath) else {
try test.assert(false); return
}
let result = try parser.parse()
guard let package = Package(type: result) else { try test.assert(false); return }
guard let package = Package(type: result, configurations: [:]) else { try test.assert(false); return }
try test.assert(package.name == "basic")
try test.assert(package.version == "0.1.0-dev")
......
......@@ -42,7 +42,7 @@ class LexerTests: Test {
let filename = __FILE__
static func testBasic() throws {
let filepath = "./atpkg/tests/collateral/basic.atpkg"
let filepath = "./tests/collateral/basic.atpkg"
let content: String = try NSString(contentsOfFile: filepath, encoding: NSUTF8StringEncoding) as String
let scanner = Scanner(content: content)
......
......@@ -25,7 +25,7 @@ class ParserTests: Test {
let filename = __FILE__
static func testBasic() throws {
let filepath = "./atpkg/tests/collateral/basic.atpkg"
let filepath = "./tests/collateral/basic.atpkg"
guard let parser = Parser(filepath: filepath) else {
try test.assert(false); return
}
......
......@@ -44,7 +44,7 @@ class ScannerTests: Test {
let filename = __FILE__
static func testBasicClj() throws {
let filepath = "./atpkg/tests/collateral/basic.atpkg"
let filepath = "./tests/collateral/basic.atpkg"
let content: String = try NSString(contentsOfFile: filepath, encoding: NSUTF8StringEncoding) as String
let scanner = Scanner(content: content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment