Files
cheesy-arena-lite/database_test.go

23 lines
377 B
Go
Raw Normal View History

2014-05-24 00:39:22 -07:00
// Copyright 2014 Team 254. All Rights Reserved.
// Author: pat@patfairbank.com (Patrick Fairbank)
package main
import (
2014-05-24 17:58:57 -07:00
"os"
2014-05-24 00:39:22 -07:00
"testing"
)
2014-05-24 17:58:57 -07:00
const testDbPath = "test.db"
func clearDb() {
os.Remove(testDbPath)
}
2014-05-24 00:39:22 -07:00
func TestOpenUnreachableDatabase(t *testing.T) {
_, err := OpenDatabase("nonexistentdir/test.db")
if err == nil {
t.Errorf("Expected error not raised")
}
}