From ab09ba6943708dd1beb442e1812fa5507197f449 Mon Sep 17 00:00:00 2001 From: belliash Date: Thu, 21 Mar 2019 17:33:40 +0100 Subject: [PATCH] Tests should use new array syntax. --- tests/arab_to_roman.aer | 4 ++-- tests/unicode_characters.aer | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/arab_to_roman.aer b/tests/arab_to_roman.aer index e47a349..a201d1c 100644 --- a/tests/arab_to_roman.aer +++ b/tests/arab_to_roman.aer @@ -3,9 +3,9 @@ class Program { private string num2Roman(int $num) { int $n = intval($num); string $result = ''; - int[] $lookup = array('M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, + int[] $lookup = {'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, 'C' => 100, 'XC' => 90, 'L' => 50, 'XL' => 40, - 'X' => 10, 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1); + 'X' => 10, 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1}; int $matches; foreach($lookup as $roman => $value) { diff --git a/tests/unicode_characters.aer b/tests/unicode_characters.aer index f68cc19..1cc905e 100644 --- a/tests/unicode_characters.aer +++ b/tests/unicode_characters.aer @@ -2,7 +2,7 @@ class Unicode { public string unicon(string $str, bool $to_uni = true) { string $cpp; - string[] $cp = array('А' => 'А', 'а' => 'а', + string[] $cp = {'А' => 'А', 'а' => 'а', "Б" => "Б", "б" => "б", "В" => "В", "в" => "в", "Г" => "Г", "г" => "г", @@ -34,7 +34,7 @@ class Unicode { "Ь" => "Ь", "ь" => "ь", "Э" => "Э", "э" => "э", "Ю" => "Ю", "ю" => "ю", - "Я" => "Я", "я" => "я"); + "Я" => "Я", "я" => "я"}; if($to_uni) { $str = strtr($str, $cp); } else {