mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-11 00:40:08 +00:00
Replace "tests/test.h" to <gtest/gtest.h> (as various unittests are for independent libraries).
This commit is contained in:
parent
86c9fe0ee9
commit
73178cd452
@ -16,7 +16,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include "app/color.h"
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, const Color& color) {
|
||||
@ -50,3 +50,9 @@ TEST(Color, toString)
|
||||
EXPECT_EQ("rgb{32,16,255}", Color::fromRgb(32, 16, 255).toString());
|
||||
EXPECT_EQ("hsv{32,64,99}", Color::fromHsv(32, 64, 99).toString());
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This source file is ditributed under a BSD-like license, please
|
||||
// read LICENSE.txt for more information.
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "base/path.h"
|
||||
|
||||
@ -119,3 +119,9 @@ TEST(Path, HasFileExtension)
|
||||
EXPECT_TRUE (has_file_extension("hi.ase", "jpg,jpeg,ase"));
|
||||
EXPECT_TRUE (has_file_extension("hi.ase", "ase,jpg,jpeg"));
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This source file is ditributed under a BSD-like license, please
|
||||
// read LICENSE.txt for more information.
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "base/shared_ptr.h"
|
||||
|
||||
@ -101,3 +101,8 @@ TEST(SharedPtr, Compare)
|
||||
EXPECT_EQ(5, *c);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This source file is ditributed under a BSD-like license, please
|
||||
// read LICENSE.txt for more information.
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -45,3 +45,9 @@ TEST(SplitString, MultipleSeparators)
|
||||
EXPECT_EQ("Wo", result[1]);
|
||||
EXPECT_EQ("ld", result[2]);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This source file is ditributed under a BSD-like license, please
|
||||
// read LICENSE.txt for more information.
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "base/thread.h"
|
||||
|
||||
@ -68,3 +68,8 @@ TEST(Thread, TwoArgs)
|
||||
EXPECT_TRUE(flag);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include "base/thread.h"
|
||||
@ -40,3 +40,9 @@ TEST(Errno, ThreadSafe)
|
||||
// See if errno was not modified in this thread.
|
||||
EXPECT_EQ(33, errno);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This source file is ditributed under a BSD-like license, please
|
||||
// read LICENSE.txt for more information.
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "gfx/hsv.h"
|
||||
#include "gfx/rgb.h"
|
||||
@ -40,3 +40,8 @@ TEST(Hsv, FromRgb)
|
||||
EXPECT_EQ(Hsv(360.0, 1.000, 1.000), Hsv(Rgb(255, 0, 0)));
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This source file is ditributed under a BSD-like license, please
|
||||
// read LICENSE.txt for more information.
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "gfx/rgb.h"
|
||||
#include "gfx/hsv.h"
|
||||
@ -79,3 +79,9 @@ TEST(Rgb, FromHsv)
|
||||
EXPECT_EQ(Rgb(252, 0, 0), Rgb(Hsv(360.0, 1.000, 0.990)));
|
||||
EXPECT_EQ(Rgb(255, 0, 0), Rgb(Hsv(360.0, 1.000, 1.000)));
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "tests/test.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include "gui/jlist.h"
|
||||
|
||||
TEST(JList, AppendAndClear)
|
||||
@ -197,3 +197,9 @@ TEST(JList, Find)
|
||||
EXPECT_EQ(jlist_nth_link(q, 1), jlist_find(q, (void*)20));
|
||||
EXPECT_EQ(jlist_nth_link(q, 2), jlist_find(q, (void*)30));
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user