summaryrefslogtreecommitdiff
path: root/test.js
diff options
context:
space:
mode:
authorevgeny <me@ch1p.com>2016-09-17 17:11:12 +0200
committerevgeny <me@ch1p.com>2016-09-17 17:11:12 +0200
commit5782f6cfdb0b12e92d13093cc45b6f4a2846d7f9 (patch)
treead57eee5ab37d26aedd66c24b9902779dbcbe864 /test.js
parenta68c68ec0e8b4416e287e94a24c34e7ccb680c1f (diff)
updated
Diffstat (limited to 'test.js')
-rw-r--r--test.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..b1a6c13
--- /dev/null
+++ b/test.js
@@ -0,0 +1,21 @@
+const vkflex = require('./index.js')
+
+let nameCases = ['Gen', 'Dat', 'Acc', 'Ins', 'Abl']
+let names = [
+ ['Евгений', 'Зиновьев', 0],
+ ['Павел', 'Дуров', 0],
+ ['Анастасия', 'Семенюк', 1],
+ ['Катя', 'Лебедева', 1]
+]
+
+console.time('flex')
+for (let [name, surname, sex] of names) {
+ console.log('Testing "'+name+' '+surname+'"...')
+
+ for (let nameCase of nameCases) {
+ console.log(nameCase + ': ' + vkflex.name(name, sex, nameCase) + ' ' + vkflex.surname(surname, sex, nameCase))
+ }
+
+ console.log('')
+}
+console.timeEnd('flex')