From 7567bc5cf68019a5f4eb6a1d5bf13c5e20fb30d1 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 23 Apr 2010 23:30:51 -0500 Subject: [PATCH] Fix unit test for when auto-use isnt on and test the other constructor error condition --- extra/constructors/constructors-tests.factor | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/extra/constructors/constructors-tests.factor b/extra/constructors/constructors-tests.factor index fef3150f6e..0ad83a6c5f 100644 --- a/extra/constructors/constructors-tests.factor +++ b/extra/constructors/constructors-tests.factor @@ -43,7 +43,17 @@ CONSTRUCTOR: ct4 ( a b c d -- obj ) [ 4 ] [ 0 0 0 0 a>> ] unit-test [ - """IN: constructors.tests + """USE: constructors +IN: constructors.tests +TUPLE: foo a b ; +CONSTRUCTOR: foo ( a a -- obj ) ;""" eval( -- ) +] [ + error>> repeated-constructor-parameters? +] must-fail-with + +[ + """USE: constructors +IN: constructors.tests TUPLE: foo a b ; CONSTRUCTOR: foo ( a c -- obj ) ;""" eval( -- ) ] [