title: Passing primitives to an OCMock's stub
body: <p>I'm learning how to use OCMock to test my iPhone's project and I have this scenario: a HeightMap class with a <code>getHeightAtX:andY:</code> method, and a Render class using <code>HeightMap</code>. I'm trying to unit test Render using some <code>HeightMap</code> mocks. This works:</p>
  
  <pre><code>id mock = [OCMockObject mockForClass:[Chunk class]];
  int h = 0;
  [[[mock stub] andReturnValue:OCMOCK_VALUE(h)] getHeightAtX:0 andY:0];
  </code></pre>
  
  <p>Of course, works only for <code>x=0</code> and <code>y=0</code>. I want to test using a "flat" height map. This means I need to do something like this:</p>
  
  <pre><code>id chunk = [OCMockObject mockForClass:[Chunk class]];
  int h = 0;
  [[[chunk stub] andReturnValue:OCMOCK_VALUE(h)] getHeightAtX:[OCMArg any] andY:[OCMArg any]];
  </code></pre>
  
  <p>But this raises two compilation warnings:</p>
  
  <blockquote>
    <p>warning: passing argument 1 of <code>'getHeightAtX:andY:'</code> makes integer from pointer without a cast</p>
  </blockquote>
  
  <p>and a runtime error:</p>
  
  <blockquote>
    <p>unexpected method invoked: <code>'getHeightAtX:0 andY:0 stubbed: getHeightAtX:15545040 andY:15545024'</code></p>
  </blockquote>
  
  <p>What am I missing? I found no way to pass a <code>anyValue</code> to this mock.</p>