Sha256: 24c57c8b8b31afb221d6cab75197d83dc2806f11c69954b254db8c43881b0441

Contents?: true

Size: 896 Bytes

Versions: 34

Compression:

Stored size: 896 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

require 'spec_helper'

include TwitterCldr::Collation

describe ImplicitCollationElements do

  it 'computes correct implicit value for non-CJK code points' do
    expect(ImplicitCollationElements.for_code_point(0xD801)).to  eq([[0xE305C758, 0x5, 0x5]])
    expect(ImplicitCollationElements.for_code_point(0xC0001)).to eq([[0xE44E70AC, 0x5, 0x5]])
    expect(ImplicitCollationElements.for_code_point(0xFFF02)).to eq([[0xE4C25F74, 0x5, 0x5]])
  end

  it 'computes correct implicit values for CJK code points' do
    expect(ImplicitCollationElements.for_code_point(0x4E00)).to  eq([[0xE00406, 0x5, 0x5]])
    expect(ImplicitCollationElements.for_code_point(0x3400)).to  eq([[0xE0ABCE, 0x5, 0x5]])
    expect(ImplicitCollationElements.for_code_point(0x20000)).to eq([[0xE1302590, 0x5, 0x5]])
  end

end

Version data entries

34 entries across 34 versions & 3 rubygems

Version Path
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/twitter_cldr-4.4.5/spec/collation/implicit_collation_elements_spec.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/twitter_cldr-4.4.5/spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.4.5 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.4.4 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.4.3 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.4.2 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.4.1 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.4.0 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.3.1 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.3.0 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.2.0 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.1.0 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-4.0.0 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-3.6.0 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-3.5.0 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-3.4.0 spec/collation/implicit_collation_elements_spec.rb
twitter_cldr-3.3.0 spec/collation/implicit_collation_elements_spec.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/twitter_cldr-3.2.1/spec/collation/implicit_collation_elements_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/twitter_cldr-3.2.1/spec/collation/implicit_collation_elements_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/twitter_cldr-3.1.2/spec/collation/implicit_collation_elements_spec.rb