1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-28 13:48:56 +08:00

fix typo suceed -> succeed

This commit is contained in:
Amit Kumar Gupta 2014-08-22 07:00:39 +00:00
parent 94e5843bcf
commit 688a82babb
3 changed files with 13 additions and 13 deletions

View File

@ -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)

View File

@ -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() {

View File

@ -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() {