var tape = require('tape');
var d3   = require('../');

tape('draw function of \'triangle_strip\' draws correctly', function(test){
    var _3d = d3._3d().primitiveType('TRIANGLE_STRIP');
    var data = [
        [[0,1,0],[0,0,0],[1,1,0],[1.5,0,0]],
        [[0,10,0],[0,0,0],[10,10,0],[15,0,0]],
    ];
    test.deepEqual(_3d.draw(_3d(data)[0]), 'M1.5,0L1,-1L0,0ZM1,-1L0,0L0,-1Z');
    test.deepEqual(_3d.draw(_3d(data)[1]), 'M15,0L10,-10L0,0ZM10,-10L0,0L0,-10Z');
    test.end();
});

// @todo draws always n-2 triangles


@@ -484,41 +484,470 @@
 );%0A%0A
-// @todo draws always n-2 triangles%0A
+tape.only('%5C'triangle_strip%5C' creates n-2 triangles', function(test)%7B%0A    var regex = /(?=%5BM%5D)/;%0A    var _3d = d3._3d().primitiveType('TRIANGLE_STRIP');%0A    var data = %5B%0A        %5B%5B0,1,0%5D,%5B0,0,0%5D,%5B1,1,0%5D,%5B1.5,0,0%5D%5D,%0A        %5B%5B0,10,0%5D,%5B0,0,0%5D,%5B10,10,0%5D,%5B15,0,0%5D,%5B20,0,0%5D%5D,%0A    %5D;%0A    test.deepEqual(_3d.draw(_3d(data)%5B0%5D).split(regex).length, data%5B0%5D.length - 2);%0A    test.deepEqual(_3d.draw(_3d(data)%5B1%5D).split(regex).length, data%5B1%5D.length - 2);%0A    test.end();%0A%7D);
 %0A

add test to check if triange_strip creates n-2 triangles