var oftype = require('../oftype');
var ddt = require('ddt');

ddt.test({
    inputs: [[undefined, undefined], 	 	//true
	     [undefined, null], 		//false
	     [undefined, Number], 		//false
	     [undefined, 'ab'], 		//false
	     [123, Number], 			//true
	     [new Number(1), Number],		//true
	     [123, undefined], 			//false
	     [123, null], 			//false
	     [123, Boolean], 			//false
	     [123, 123], 			//false
	     [123, '123'], 			//false
	     ['abc', String], 			//true
	     [new String('a'), String],		//true
	     ['abc', 'abc'], 			//false
	     ['abc', Boolean], 			//false
	     ['abc', Object],	 		//false
	     [true, Boolean], 			//true
	     [new Boolean(true), Boolean],	//true
	     [true, Object], 			//false
	     [true, Function], 			//false
	     [null, null], 			//true
	     [null, Function], 			//false
	     [null, Array], 			//false
	     [null, 'null'], 			//false
	     [null, Object], 			//false
	     [[1,2,3], Array], 			//true
	     [new Date, Date],			//true
	     [/abc/, RegExp],			//true
	     [new RegExp('a'), RegExp],		//true
	     [new Obj, Obj],			//true
	     [new Obj, Object],			//true
	     [new Obj, RegExp],			//false
	     [new Obj, Number],			//false
	     [new Obj, 'Obj'],			//false
	     [new Obj, Date]],			//false

    outputs: [true, false, false, false,
	      true, true, false, false, false, false, false,
	      true, true, false, false, false,
	      true, true, false, false,
	      true, false, false, false, false,
	      true, 
	      true,
	      true, true,
	      true, true, false, false, false, false],

    transform: function(input) {
	return oftype(input[0], input[1]);
    },
    
    validate: function(expected, actual) {
	return expected == actual;
    },

    groupName: 'Test group 1'	
});

function Obj() {
    this.name = 'ABC';
}

@@ -1668,15 +1668,13 @@
     
-validat
+befor
 e: f
@@ -1685,62 +1685,50 @@
 ion(
-expected, actual) %7B%0A%09return expected == actual
+) %7B%0A%09oftype.primitiveObject = true
 ;%0A    %7D,
 %0A%0A  
@@ -1723,16 +1723,17 @@
 ;%0A    %7D,
+%09
 %0A%0A    gr

add before function in test 1