if (typeof define !== 'function') {
    var define = require('amdefine')(module);
}

define(["require","../deep", "../deep-unit"], function (require, deep, Unit) {
    
    //_______________________________________________________________ GENERIC STORE TEST CASES


    var unit = {
        title:"deep/units/collisions",
        stopOnError:false,
        setup:function(){},
        tests : {
            "up":function(){
                return deep({
                    steps:[
                    {
                        id:"client",
                        label:"hello"
                    }]
                })
                .up({
                    steps:[
                        {
                            id:"address",
                            label:"heu"
                        },
                        {
                            id:"client",
                            label:"world",
                            testez:1
                        }
                    ]
                })
                .equal({
                 "steps": [
                  {
                   "id": "client",
                   "label": "world",
                   "testez": 1
                  },
                  {
                   "id": "address",
                   "label": "heu"
                  }
                 ]
                });
            },
            "bottom":function(){
                return deep({
                    steps:[
                    {
                        id:"client",
                        label:"hello"
                    }]
                })
                .bottom({
                    steps:[
                        {
                            id:"address",
                            label:"heu"
                        },
                        {
                            id:"client",
                            label:"world",
                            testez:1
                        }
                    ]
                })
                .equal( {
                 "steps": [
                  {
                   "id": "address",
                   "label": "heu"
                  },
                  {
                   "id": "client",
                   "label": "hello",
                   "testez": 1
                  }
                 ]
                });
            }
        }
    };

    return new Unit(unit);
});


@@ -2346,32 +2346,986 @@
             %7D);%0A
+            %7D,%0A            bottom_deep_ocm_:function()%7B%0A              var autre = %7B%0A                  test:%7B%0A                      b:%7B%0A                          yee:true%0A                      %7D%0A                  %7D%0A              %7D;%0A              var obj = %7B%0A                  backgrounds:%5Bautre%5D,%0A                  test:deep.ocm(%7B%0A                      a:%7B%0A                          title:%22hello a%22%0A                      %7D,%0A                      b:%7B%0A                          backgrounds:%5B%22this::../a%22%5D,%0A                          titleb:%22bye%22%0A                      %7D%0A                  %7D)%0A              %7D;%0A%0A              var tt = obj.test;%0A%0A              return deep(obj)%0A              .flatten()%0A              .done(function(success)%7B%0A                  return obj.test.flatten();%0A              %7D)%0A              .done(function(success)%7B%0A                  return tt(%22b%22);%0A              %7D)%0A              .equal( %7B title:%22hello a%22, yee:true, titleb:%22bye%22%7D );%0A
             %7D%0A  

add bottom_ocm_testcase