From e969cd739ac01499957e2f80794c8697c7f18a4b Mon Sep 17 00:00:00 2001 From: chnliyong Date: Sat, 27 Jul 2019 14:20:46 +0000 Subject: [PATCH] Fix some spelling errors --- spec/Document_spec.lua | 6 +++--- spec/Schema_spec.lua | 4 ++-- src/Schema.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/Document_spec.lua b/spec/Document_spec.lua index fdda8b7..919b6f6 100644 --- a/spec/Document_spec.lua +++ b/spec/Document_spec.lua @@ -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() @@ -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) @@ -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)) diff --git a/spec/Schema_spec.lua b/spec/Schema_spec.lua index 492093c..ffe9f66 100644 --- a/spec/Schema_spec.lua +++ b/spec/Schema_spec.lua @@ -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)) diff --git a/src/Schema.cpp b/src/Schema.cpp index 4fb7b31..01c093e 100644 --- a/src/Schema.cpp +++ b/src/Schema.cpp @@ -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());