spec/compact_protocol_spec.rb in thrift-0.8.0 vs spec/compact_protocol_spec.rb in thrift-0.9.0
- old
+ new
@@ -1,5 +1,6 @@
+# encoding: UTF-8
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
@@ -15,18 +16,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
+require 'spec_helper'
describe Thrift::CompactProtocol do
TESTS = {
:byte => (-127..127).to_a,
:i16 => (0..14).map {|shift| [1 << shift, -(1 << shift)]}.flatten.sort,
:i32 => (0..30).map {|shift| [1 << shift, -(1 << shift)]}.flatten.sort,
:i64 => (0..62).map {|shift| [1 << shift, -(1 << shift)]}.flatten.sort,
- :string => ["", "1", "short", "fourteen123456", "fifteen12345678", "1" * 127, "1" * 3000],
+ :string => ["", "1", "short", "fourteen123456", "fifteen12345678", "unicode characters: \u20AC \u20AD", "1" * 127, "1" * 3000],
:binary => ["", "\001", "\001" * 5, "\001" * 14, "\001" * 15, "\001" * 127, "\001" * 3000],
:double => [0.0, 1.0, -1.0, 1.1, -1.1, 10000000.1, 1.0/0.0, -1.0/0.0],
:bool => [true, false]
}
\ No newline at end of file