Commit 1fc00948 authored by Drew's avatar Drew

Add error tests

See f0193f20
parent f4f17e32
// Copyright (c) 2016 Drew Crawford.
//
// 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.
import CarolineCore
class NoErrorCheck: CarolineTest {
func test() {
self.check {
print("got here")
}
}
}
private struct MyError: Error {
}
class ErrorCheck: CarolineTest {
func test() {
self.check {
throw MyError()
}
}
var expectFailure: Bool { return true }
}
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