|
1 | | -using HanziRomanization |
| 1 | +using Hanzi |
2 | 2 | using Test |
3 | 3 |
|
4 | 4 | @testset "Hanzi.jl" begin |
5 | 5 | # PINYIN TESTS |
6 | | - @test HanziRomanization.pinyin("㐀") == [["qiū"]] # test single character `multiple=false` singular pronunciation |
7 | | - @test HanziRomanization.pinyin("㐀", multiple=true) == [["qiū"]] # test single character `multiple=true` singular pronunciation |
8 | | - @test HanziRomanization.pinyin("是") == [["shì"]] # test single character `multiple=false` multiple pronunciations |
9 | | - @test HanziRomanization.pinyin("是", multiple=true) == [["shì", "tí"]] # test single character `multiple=true` multiple pronunciations |
10 | | - @test HanziRomanization.pinyin("你好") == [["nǐ"], ["hǎo"]] # test multiple characters `multiple=false` multiple pronunciations |
11 | | - @test HanziRomanization.pinyin("你好", multiple=true) == [["nǐ"], ["hǎo", "hào"]] # test multiple characters `multiple=true` multiple pronunciations |
12 | | - @test HanziRomanization.pinyin("我叫John。你呢?") == [["wǒ"], ["jiào"], ["John。"], ["nǐ"], ["ne"], ["?"]] # test multiple characters `multiple=false` multiple pronunciations non-recognized glyphs |
13 | | - @test HanziRomanization.pinyin("我叫John。你呢?", multiple=true) == [["wǒ"], ["jiào"], ["John。"], ["nǐ"], ["ne", "ní", "nǐ", "nī"], ["?"]] # test multiple characters `multiple=true` multiple pronunciations non-recognized glyphs |
| 6 | + @test Hanzi.pinyin("㐀") == [["qiū"]] # test single character `multiple=false` singular pronunciation |
| 7 | + @test Hanzi.pinyin("㐀", multiple=true) == [["qiū"]] # test single character `multiple=true` singular pronunciation |
| 8 | + @test Hanzi.pinyin("是") == [["shì"]] # test single character `multiple=false` multiple pronunciations |
| 9 | + @test Hanzi.pinyin("是", multiple=true) == [["shì", "tí"]] # test single character `multiple=true` multiple pronunciations |
| 10 | + @test Hanzi.pinyin("你好") == [["nǐ"], ["hǎo"]] # test multiple characters `multiple=false` multiple pronunciations |
| 11 | + @test Hanzi.pinyin("你好", multiple=true) == [["nǐ"], ["hǎo", "hào"]] # test multiple characters `multiple=true` multiple pronunciations |
| 12 | + @test Hanzi.pinyin("我叫John。你呢?") == [["wǒ"], ["jiào"], ["John。"], ["nǐ"], ["ne"], ["?"]] # test multiple characters `multiple=false` multiple pronunciations non-recognized glyphs |
| 13 | + @test Hanzi.pinyin("我叫John。你呢?", multiple=true) == [["wǒ"], ["jiào"], ["John。"], ["nǐ"], ["ne", "ní", "nǐ", "nī"], ["?"]] # test multiple characters `multiple=true` multiple pronunciations non-recognized glyphs |
14 | 14 |
|
15 | 15 | # WADE-GILES TESTS |
16 | | - @test HanziRomanization.wadegiles("㐀") == [["ch'iu1"]] # test single character `multiple=false` singular pronunciation |
17 | | - @test HanziRomanization.wadegiles("㐀", multiple=true) == [["ch'iu1"]] # test single character `multiple=true` singular pronunciation |
18 | | - @test HanziRomanization.wadegiles("是") == [["shih4"]] # test single character `multiple=false` multiple pronunciations |
19 | | - @test HanziRomanization.wadegiles("是", multiple=true) == [["shih4", "t'i2"]] # test single character `multiple=true` multiple pronunciations |
20 | | - @test HanziRomanization.wadegiles("你好") == [["ni3"], ["hao3"]] # test multiple characters `multiple=false` multiple pronunciations |
21 | | - @test HanziRomanization.wadegiles("你好", multiple=true) == [["ni3"], ["hao3", "hao4"]] # test multiple characters `multiple=true` multiple pronunciations |
22 | | - @test HanziRomanization.wadegiles("我叫John。你呢?") == [["wo3"], ["chiao4"], ["John。"], ["ni3"], ["ne"], ["?"]] # test multiple characters `multiple=false` multiple pronunciations non-recognized glyphs |
23 | | - @test HanziRomanization.wadegiles("我叫John。你呢?", multiple=true) == [["wo3"], ["chiao4"], ["John。"], ["ni3"], ["ne", "ni2", "ni3", "ni1"], ["?"]] # test multiple characters `multiple=true` multiple pronunciations non-recognized glyphs |
| 16 | + @test Hanzi.wadegiles("㐀") == [["ch'iu1"]] # test single character `multiple=false` singular pronunciation |
| 17 | + @test Hanzi.wadegiles("㐀", multiple=true) == [["ch'iu1"]] # test single character `multiple=true` singular pronunciation |
| 18 | + @test Hanzi.wadegiles("是") == [["shih4"]] # test single character `multiple=false` multiple pronunciations |
| 19 | + @test Hanzi.wadegiles("是", multiple=true) == [["shih4", "t'i2"]] # test single character `multiple=true` multiple pronunciations |
| 20 | + @test Hanzi.wadegiles("你好") == [["ni3"], ["hao3"]] # test multiple characters `multiple=false` multiple pronunciations |
| 21 | + @test Hanzi.wadegiles("你好", multiple=true) == [["ni3"], ["hao3", "hao4"]] # test multiple characters `multiple=true` multiple pronunciations |
| 22 | + @test Hanzi.wadegiles("我叫John。你呢?") == [["wo3"], ["chiao4"], ["John。"], ["ni3"], ["ne"], ["?"]] # test multiple characters `multiple=false` multiple pronunciations non-recognized glyphs |
| 23 | + @test Hanzi.wadegiles("我叫John。你呢?", multiple=true) == [["wo3"], ["chiao4"], ["John。"], ["ni3"], ["ne", "ni2", "ni3", "ni1"], ["?"]] # test multiple characters `multiple=true` multiple pronunciations non-recognized glyphs |
24 | 24 | end |
0 commit comments