diff --git a/base/edf/alloc_test.go b/base/edf/alloc_test.go index 2efdfea..1cf3859 100644 --- a/base/edf/alloc_test.go +++ b/base/edf/alloc_test.go @@ -11,18 +11,18 @@ func TestAllocFixed(t *testing.T) { Convey("Creating a non-existent file should succeed", t, func() { tempFile, err := ioutil.TempFile(os.TempDir(), "TestFileCreate") So(err, ShouldEqual, nil) - Convey("Mapping the file should suceed", func() { + Convey("Mapping the file should succeed", func() { mapping, err := EdfMap(tempFile, EDF_CREATE) So(err, ShouldEqual, nil) - Convey("Allocation should suceed", func() { + Convey("Allocation should succeed", func() { r, err := mapping.AllocPages(1, 2) So(err, ShouldEqual, nil) So(r.Start.Byte, ShouldEqual, 4*os.Getpagesize()) So(r.Start.Segment, ShouldEqual, 0) - Convey("Unmapping the file should suceed", func() { + Convey("Unmapping the file should succeed", func() { err = mapping.Unmap(EDF_UNMAP_SYNC) So(err, ShouldEqual, nil) - Convey("Remapping the file should suceed", func() { + Convey("Remapping the file should succeed", func() { mapping, err = EdfMap(tempFile, EDF_READ_ONLY) Convey("Should get the same allocations back", func() { rr, err := mapping.GetThreadBlocks(2) @@ -41,20 +41,20 @@ func TestAllocWithExtraContentsBlock(t *testing.T) { Convey("Creating a non-existent file should succeed", t, func() { tempFile, err := ioutil.TempFile(os.TempDir(), "TestFileCreate") So(err, ShouldEqual, nil) - Convey("Mapping the file should suceed", func() { + Convey("Mapping the file should succeed", func() { mapping, err := EdfMap(tempFile, EDF_CREATE) So(err, ShouldEqual, nil) - Convey("Allocation of 10 pages should suceed", func() { + Convey("Allocation of 10 pages should succeed", func() { allocated := make([]EdfRange, 10) for i := 0; i < 10; i++ { r, err := mapping.AllocPages(1, 2) So(err, ShouldEqual, nil) allocated[i] = r } - Convey("Unmapping the file should suceed", func() { + Convey("Unmapping the file should succeed", func() { err = mapping.Unmap(EDF_UNMAP_SYNC) So(err, ShouldEqual, nil) - Convey("Remapping the file should suceed", func() { + Convey("Remapping the file should succeed", func() { mapping, err = EdfMap(tempFile, EDF_READ_ONLY) Convey("Should get the same allocations back", func() { rr, err := mapping.GetThreadBlocks(2) diff --git a/base/edf/map_test.go b/base/edf/map_test.go index cfb35ec..c5c30c6 100644 --- a/base/edf/map_test.go +++ b/base/edf/map_test.go @@ -8,7 +8,7 @@ import ( ) func TestAnonMap(t *testing.T) { - Convey("Anonymous mapping should suceed", t, func() { + Convey("Anonymous mapping should succeed", t, func() { mapping, err := EdfAnonMap() So(err, ShouldEqual, nil) bytes := mapping.m[0] @@ -39,10 +39,10 @@ func TestFileCreate(t *testing.T) { Convey("Creating a non-existent file should succeed", t, func() { tempFile, err := ioutil.TempFile(os.TempDir(), "TestFileCreate") So(err, ShouldEqual, nil) - Convey("Mapping the file should suceed", func() { + Convey("Mapping the file should succeed", func() { mapping, err := EdfMap(tempFile, EDF_CREATE) So(err, ShouldEqual, nil) - Convey("Unmapping the file should suceed", func() { + Convey("Unmapping the file should succeed", func() { err = mapping.Unmap(EDF_UNMAP_SYNC) So(err, ShouldEqual, nil) }) @@ -90,7 +90,7 @@ func TestFileThreadCounter(t *testing.T) { Convey("Creating a non-existent file should succeed", t, func() { tempFile, err := ioutil.TempFile(os.TempDir(), "TestFileCreate") So(err, ShouldEqual, nil) - Convey("Mapping the file should suceed", func() { + Convey("Mapping the file should succeed", func() { mapping, err := EdfMap(tempFile, EDF_CREATE) So(err, ShouldEqual, nil) Convey("The file should have two threads to start with", func() { diff --git a/base/edf/thread_test.go b/base/edf/thread_test.go index e259a2a..3671dc6 100644 --- a/base/edf/thread_test.go +++ b/base/edf/thread_test.go @@ -36,7 +36,7 @@ func TestThreadFindAndWrite(T *testing.T) { Convey("Creating a non-existent file should succeed", T, func() { tempFile, err := os.OpenFile("hello.db", os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0700) //ioutil.TempFile(os.TempDir(), "TestFileCreate") So(err, ShouldEqual, nil) - Convey("Mapping the file should suceed", func() { + Convey("Mapping the file should succeed", func() { mapping, err := EdfMap(tempFile, EDF_CREATE) So(err, ShouldEqual, nil) Convey("Writing the thread should succeed", func() {