diff options
author | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-02-02 15:51:41 +0200 |
---|---|---|
committer | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-02-02 15:51:41 +0200 |
commit | 8bff62c335842b4c850cc09716e79c2f556247c7 (patch) | |
tree | 281dd5c4a92087f6308e3fb540aba62d7fd272c2 /tests/test-resource/test-resource.h | |
parent | b7d622788b55d30d51ce30bd58634763fddf66fc (diff) |
directory structure changes
Diffstat (limited to 'tests/test-resource/test-resource.h')
-rw-r--r-- | tests/test-resource/test-resource.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/test-resource/test-resource.h b/tests/test-resource/test-resource.h new file mode 100644 index 0000000..fc04c47 --- /dev/null +++ b/tests/test-resource/test-resource.h @@ -0,0 +1,54 @@ +#ifndef TEST_RESOURCE_H +#define TEST_RESOURCE_H + +#include <QtTest/QTest> +#include <QMetaType> +#include "resources.h" + +Q_DECLARE_METATYPE(ResourcePolicy::ResourceType) + +using namespace ResourcePolicy; + +class TestResource: public QObject +{ + Q_OBJECT +private: + AudioResource *audioResource; + AudioRecorderResource *audioRecorderResource; + Resource *videoResource; + Resource *videoRecorderResource; + Resource *vibraResource; + Resource *ledsResource; + Resource *backlightResource; + Resource *systemButtonResource; + Resource *lockButtonResource; + Resource *scaleButtonResource; + Resource *snapButtonResource; + Resource *lensCoverResource; + + Resource * resourceFromType(ResourceType type); + const char * stringFromType(ResourceType type); +public: + TestResource(); + ~TestResource(); + +private slots: + + void init(); + void cleanup(); + + void testType(); + + void testOptional_data(); + void testOptional(); + + void testShared_data(); + void testShared(); + + void testGranted_data(); + void testGranted(); + + void testClone(); +}; + +#endif |