]> gitweb.factorcode.org Git - factor.git/blob - basis/random/passwords/passwords-tests.factor
b47e682c37f5db8b88f46a588c949394e1b63816
[factor.git] / basis / random / passwords / passwords-tests.factor
1 ! Copyright (C) 2019 Alexander Ilin.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: math math.parser random.passwords sequences tools.test ;
4 IN: random.passwords.tests
5
6 { "aaaaaaaaaa" } [ 10 "a" password ] unit-test
7 { 10 } [ 10 "ab" password length ] unit-test
8 { "" } [ 0 "ab" password ] unit-test
9 [ -1 "ab" password ] must-fail
10
11 { 2 } [ 2 ascii-password length ] unit-test
12 { 3 } [ 3 alnum-password length ] unit-test
13 { 4 } [ 4 hex-password length ] unit-test
14 { t } [ 4 hex-password hex> 65535 <= ] unit-test