Skip to content

Commit

Permalink
Fix some spelling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chnliyong authored and xpol committed Jul 28, 2019
1 parent 22b9f1b commit e969cd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions spec/Document_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('rapidjson.Document', function()
before_each(function()
doc:parse('{"a": ["apple", "air"], "/":10, "~": 0.5, " ": "ws"}')
end)
it('"" returns entire docuement', function()
it('"" returns entire document', function()
assert.are.same({a = {'apple', 'air'}, ['/'] = 10, ['~'] = 0.5, [' '] = 'ws'}, doc:get(''))
end)
it('"/a" retusn root object value of key "a"', function()
Expand Down Expand Up @@ -146,7 +146,7 @@ describe('rapidjson.Document', function()
end)

describe(':stringify()', function()
it('serializes docuement to string', function()
it('serializes document to string', function()
doc:parse('{"a":["apple","air"],"/":10,"~":0.5," ":"ws"}')
assert.are.equals('{"a":["apple","air"],"/":10,"~":0.5," ":"ws"}', doc:stringify())
end)
Expand All @@ -169,7 +169,7 @@ describe('rapidjson.Document', function()
after_each(function()
os.remove(filename)
end)
it('saves docuement to file', function()
it('saves document to file', function()
doc:parse('{"a":["apple","air"],"/":10,"~":0.5," ":"ws"}')
doc:save(filename)
assert.are.equals('{"a":["apple","air"],"/":10,"~":0.5," ":"ws"}', fileContents(filename))
Expand Down
4 changes: 2 additions & 2 deletions spec/Schema_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ describe('rapidjson.SchemaValidator', function()
assert.is_false(ok)
assert.is_not_nil(ok)
assert.are.equals('string', type(err))
assert.are.equals('invalid "type" in docuement at pointer "#"', err)
assert.are.equals('invalid "type" in document at pointer "#"', err)
end)
end)
describe('restes validator status internally', function()
it('so that can validate mulitple docuement', function()
it('so that can validate mulitple document', function()
local n = rapidjson.Document('42')
local invalid = rapidjson.Document('{"a": "b"}')
assert.is_true(validator:validate(n))
Expand Down
4 changes: 2 additions & 2 deletions src/Schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ static void pushValidator_error(lua_State* L, SchemaValidator* validator) {
luaL_addstring(&b, "invalid \"");

luaL_addstring(&b, validator->GetInvalidSchemaKeyword());
luaL_addstring(&b, "\" in docuement at pointer \"");
luaL_addstring(&b, "\" in document at pointer \"");

// docuement pointer
// document pointer
StringBuffer sb;
validator->GetInvalidDocumentPointer().StringifyUriFragment(sb);
luaL_addlstring(&b, sb.GetString(), sb.GetSize());
Expand Down

0 comments on commit e969cd7

Please sign in to comment.