/indra/newview/tests/lltextureinfodetails_test.cpp

https://bitbucket.org/lindenlab/viewer-beta/ · C++ · 92 lines · 23 code · 13 blank · 56 comment · 0 complexity · 73472e718422ff5fc89d26f0e1f8fc22 MD5 · raw file

  1. /**
  2. * @file llwtextureinfodetails_test.cpp
  3. * @author Si & Gabriel
  4. * @date 2009-03-30
  5. *
  6. * $LicenseInfo:firstyear=2006&license=viewerlgpl$
  7. * Second Life Viewer Source Code
  8. * Copyright (C) 2010, Linden Research, Inc.
  9. *
  10. * This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation;
  13. * version 2.1 of the License only.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with this library; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. *
  24. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  25. * $/LicenseInfo$
  26. */
  27. // Precompiled header: almost always required for newview cpp files
  28. #include "../llviewerprecompiledheaders.h"
  29. // Class to test
  30. #include "../lltextureinfodetails.h"
  31. // Dependencies
  32. // Tut header
  33. #include "../test/lltut.h"
  34. // -------------------------------------------------------------------------------------------
  35. // Stubbing: Declarations required to link and run the class being tested
  36. // Notes:
  37. // * Add here stubbed implementation of the few classes and methods used in the class to be tested
  38. // * Add as little as possible (let the link errors guide you)
  39. // * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code)
  40. // * A simulator for a class can be implemented here. Please comment and document thoroughly.
  41. // End Stubbing
  42. // -------------------------------------------------------------------------------------------
  43. // -------------------------------------------------------------------------------------------
  44. // TUT
  45. // -------------------------------------------------------------------------------------------
  46. namespace tut
  47. {
  48. // Test wrapper declarations
  49. struct textureinfodetails_test
  50. {
  51. // Constructor and destructor of the test wrapper
  52. textureinfodetails_test()
  53. {
  54. }
  55. ~textureinfodetails_test()
  56. {
  57. }
  58. };
  59. // Tut templating thingamagic: test group, object and test instance
  60. typedef test_group<textureinfodetails_test> textureinfodetails_t;
  61. typedef textureinfodetails_t::object textureinfodetails_object_t;
  62. tut::textureinfodetails_t tut_textureinfodetails("LLTextureInfoDetails");
  63. // ---------------------------------------------------------------------------------------
  64. // Test functions
  65. // Notes:
  66. // * Test as many as you possibly can without requiring a full blown simulation of everything
  67. // * The tests are executed in sequence so the test instance state may change between calls
  68. // * Remember that you cannot test private methods with tut
  69. // ---------------------------------------------------------------------------------------
  70. // ---------------------------------------------------------------------------------------
  71. // Test the LLTextureInfo
  72. // ---------------------------------------------------------------------------------------
  73. // Test instantiation
  74. template<> template<>
  75. void textureinfodetails_object_t::test<1>()
  76. {
  77. ensure("have we crashed?", true);
  78. }
  79. }