]> git.donarmstrong.com Git - flightcrew.git/blob - src/FlightCrew/tests/misc_tests/DetermineMimetype_test.cpp
Imported Upstream version 0.7.2+dfsg
[flightcrew.git] / src / FlightCrew / tests / misc_tests / DetermineMimetype_test.cpp
1 /************************************************************************\r
2 **\r
3 **  Copyright (C) 2010  Strahinja Markovic\r
4 **\r
5 **  This file is part of FlightCrew.\r
6 **\r
7 **  FlightCrew is free software: you can redistribute it and/or modify\r
8 **  it under the terms of the GNU Lesser General Public License as published\r
9 **  by the Free Software Foundation, either version 3 of the License, or\r
10 **  (at your option) any later version.\r
11 **\r
12 **  FlightCrew is distributed in the hope that it will be useful,\r
13 **  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15 **  GNU Lesser General Public License for more details.\r
16 **\r
17 **  You should have received a copy of the GNU Lesser General Public License\r
18 **  along with FlightCrew.  If not, see <http://www.gnu.org/licenses/>.\r
19 **\r
20 *************************************************************************/\r
21 \r
22 #include <stdafx_tests.h>\r
23 #include "Misc/DetermineMimetype.h"\r
24 \r
25 namespace FlightCrew\r
26 {\r
27 \r
28 extern const std::string OEBPS_MIME;  \r
29 extern const std::string XHTML_MIME; \r
30 extern const std::string NCX_MIME;    \r
31 extern const std::string PNG_MIME;    \r
32 extern const std::string GIF_MIME;  \r
33 extern const std::string JPEG_MIME;   \r
34 extern const std::string SVG_MIME;    \r
35 extern const std::string DTBOOK_MIME; \r
36 extern const std::string CSS_MIME;    \r
37 extern const std::string XML_MIME;    \r
38 extern const std::string XPGT_MIME;   \r
39 extern const std::string OTF_MIME;    \r
40 extern const std::string TTF_MIME;    \r
41 extern const std::string OEB_DOC_MIME;\r
42 extern const std::string OEB_CSS_MIME;\r
43 \r
44 extern const std::string UNKNOWN_MIME;\r
45 \r
46 }\r
47 \r
48 using namespace FlightCrew;\r
49 \r
50 TEST( DetermineMimetypeTest, ExtensionChecks )\r
51 {\r
52     EXPECT_EQ( DetermineMimetype( "test.xhtml" ), XHTML_MIME );\r
53     EXPECT_EQ( DetermineMimetype( "test.html"  ), XHTML_MIME );\r
54     EXPECT_EQ( DetermineMimetype( "test.htm"   ), XHTML_MIME );\r
55     EXPECT_EQ( DetermineMimetype( "test.png"   ), PNG_MIME   );\r
56     EXPECT_EQ( DetermineMimetype( "test.gif"   ), GIF_MIME   );\r
57     EXPECT_EQ( DetermineMimetype( "test.jpg"   ), JPEG_MIME  );\r
58     EXPECT_EQ( DetermineMimetype( "test.jpeg"  ), JPEG_MIME  );\r
59     EXPECT_EQ( DetermineMimetype( "test.css"   ), CSS_MIME   );\r
60     EXPECT_EQ( DetermineMimetype( "test.ncx"   ), NCX_MIME   );\r
61     EXPECT_EQ( DetermineMimetype( "test.svg"   ), SVG_MIME   ); \r
62     EXPECT_EQ( DetermineMimetype( "test.otf"   ), OTF_MIME   );\r
63     EXPECT_EQ( DetermineMimetype( "test.ttf"   ), TTF_MIME   );\r
64 }\r
65 \r
66 TEST( DetermineMimetypeTest, ContentChecks )\r
67 {\r
68     // TODO\r
69 }\r