<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shurabaP</author_name>
  <author_url>https://blog.hatena.ne.jp/shurabaP/</author_url>
  <blog_title>フェルマータ</blog_title>
  <blog_url>https://shurabap.hatenablog.jp/</blog_url>
  <categories>
    <anon>C++</anon>
    <anon>テスト</anon>
    <anon>Google Mock</anon>
  </categories>
  <description>経緯 以前書いたGoogle Mock を導入してみた。に見るように 普通の仮想メンバ関数のモッキングは大変簡単なのだが、演算子のオーバーロードに対してはモッキングができないのかやり方を調べてみた。 問題 単純に仮想関数をモッキングするだけであれば、MOCK_METHOD*を書けば良いだけなのだが以下の様なコードは許容されなかった。 どうやら単純にはできないらしい。 class MyList { public: virtual ~MyList(){ } virtual MyElement &amp;operator[](int index) = 0; }; class MockedMyList : p…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshurabap.hatenablog.jp%2Fentry%2F2014%2F03%2F17%2F223653&quot; title=&quot;Google Mock で演算子オーバーロードしたクラスのモックを作る。 - フェルマータ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-03-17 22:36:53</published>
  <title>Google Mock で演算子オーバーロードしたクラスのモックを作る。</title>
  <type>rich</type>
  <url>https://shurabap.hatenablog.jp/entry/2014/03/17/223653</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
