Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (40 sloc) 0.945 kB
! Copyright (C) 2005 Chris Double. All Rights Reserved.
! See http://factorcode.org/license.txt for BSD license.
!
USING: kernel tools.test math channels channels.private
sequences threads sorting ;
IN: channels.tests
{ V{ 10 } } [
V{ } clone <channel>
[ from swap push ] in-thread
10 swap to
] unit-test
{ 20 } [
<channel>
[ 20 swap to ] in-thread
from
] unit-test
{ { 1 2 3 4 } } [
V{ } clone <channel>
[ from swap push ] in-thread
[ from swap push ] in-thread
[ from swap push ] in-thread
[ from swap push ] in-thread
4 over to
2 over to
1 over to
3 swap to
natural-sort
] unit-test
{ { 1 2 4 9 } } [
V{ } clone <channel>
[ 4 swap to ] in-thread
[ 2 swap to ] in-thread
[ 1 swap to ] in-thread
[ 9 swap to ] in-thread
2dup from swap push
2dup from swap push
2dup from swap push
dupd from swap push
natural-sort
] unit-test
Jump to Line
Something went wrong with that request. Please try again.