Skip to content
Snippets Groups Projects
Commit b4d3b64e authored by Gerardo Tauriello's avatar Gerardo Tauriello
Browse files

Remove outdated fix for Mac

parent 8dda519d
Branches
Tags
No related merge requests found
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
/* /*
Author: Marco Biasini Author: Marco Biasini
*/ */
#include <ost/string_ref.hh>
#include <ost/platform.hh>
#include <ost/gfx/gfx_node.hh> #include <ost/gfx/gfx_node.hh>
#include <ost/gfx/gfx_object.hh> #include <ost/gfx/gfx_object.hh>
#include <ost/gfx/scene.hh> #include <ost/gfx/scene.hh>
...@@ -33,28 +31,6 @@ using boost::unit_test_framework::test_suite; ...@@ -33,28 +31,6 @@ using boost::unit_test_framework::test_suite;
using namespace ost; using namespace ost;
using namespace ost::gfx; using namespace ost::gfx;
// small RAII class to setup environment for unit tests. even though we don't
// use any of the rendering functionality, we still need to initialize an
// offscreen buffer on mac to avoid segfaults.
struct GfxTestEnv {
GfxTestEnv()
{
#if defined(__APPLE__)
// we know OST_ROOT is set for unit tests
SetPrefixPath(getenv("OST_ROOT"));
Scene::Instance().StartOffscreenMode(100, 100);
#endif
}
~GfxTestEnv()
{
#if defined(__APPLE__)
Scene::Instance().StopOffscreenMode();
#endif
}
};
struct Observer : public SceneObserver { struct Observer : public SceneObserver {
Observer(): added_count(0),removed_count(0) {} Observer(): added_count(0),removed_count(0) {}
...@@ -134,7 +110,6 @@ BOOST_AUTO_TEST_CASE(gfx_node_remove_all) ...@@ -134,7 +110,6 @@ BOOST_AUTO_TEST_CASE(gfx_node_remove_all)
BOOST_AUTO_TEST_CASE(is_attached_to_scene) BOOST_AUTO_TEST_CASE(is_attached_to_scene)
{ {
GfxTestEnv env;
Scene::Instance().RemoveAll(); Scene::Instance().RemoveAll();
GfxNodeP n1(new GfxNode("1")); GfxNodeP n1(new GfxNode("1"));
GfxNodeP n2(new GfxNode("2")); GfxNodeP n2(new GfxNode("2"));
...@@ -152,7 +127,6 @@ BOOST_AUTO_TEST_CASE(is_attached_to_scene) ...@@ -152,7 +127,6 @@ BOOST_AUTO_TEST_CASE(is_attached_to_scene)
BOOST_AUTO_TEST_CASE(observe_added_removed) BOOST_AUTO_TEST_CASE(observe_added_removed)
{ {
GfxTestEnv env;
Observer o1; Observer o1;
Scene::Instance().RemoveAll(); Scene::Instance().RemoveAll();
Scene::Instance().AttachObserver(&o1); Scene::Instance().AttachObserver(&o1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment