<commit_before>USING: classes.singleton io.streams.string kernel see tools.test ;
IN: classes.singleton.tests

{ } [ SINGLETON: bzzt ] unit-test
{ t } [ bzzt bzzt? ] unit-test
{ t } [ bzzt bzzt eq? ] unit-test
GENERIC: zammo ( obj -- str )
{ } [ M: bzzt zammo drop "yes!" ; ] unit-test
{ "yes!" } [ bzzt zammo ] unit-test
{ } [ SINGLETON: omg ] unit-test
{ t } [ omg singleton-class? ] unit-test
{ "IN: classes.singleton.tests\nSINGLETON: omg\n" } [ [ omg see ] with-string-writer ] unit-test

SINGLETON: word-and-singleton

: word-and-singleton ( -- x ) 3 ;

{ t } [ \ word-and-singleton word-and-singleton? ] unit-test
{ 3 } [ word-and-singleton ] unit-test<commit_msg>singleton: Move definitions to top level in tests.<commit_after>USING: classes.singleton io.streams.string kernel see tools.test ;
IN: classes.singleton.tests

SINGLETON: bzzt
{ t } [ bzzt bzzt? ] unit-test
{ t } [ bzzt bzzt eq? ] unit-test

GENERIC: zammo ( obj -- str )
{ } [ M: bzzt zammo drop "yes!" ; ] unit-test
{ "yes!" } [ bzzt zammo ] unit-test

SINGLETON: omg
{ t } [ omg singleton-class? ] unit-test
{ "IN: classes.singleton.tests\nSINGLETON: omg\n" } [ [ omg see ] with-string-writer ] unit-test

SINGLETON: word-and-singleton

: word-and-singleton ( -- x ) 3 ;

{ t } [ \ word-and-singleton word-and-singleton? ] unit-test
{ 3 } [ word-and-singleton ] unit-test
{'fraction_non_alphanumeric': 0.16059479553903347, 'fraction_numerical': 0.002973977695167286, 'mean_word_length': 3.3843648208469057, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4930037', 'n_tokens_mistral': 530, 'n_tokens_neox': 535, 'n_words': 124}