diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-26 13:17:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-26 13:17:21 -0600 |
commit | dfe289850f068f19ba4a83ab4e7e22a7e09c13c9 (patch) | |
tree | c297348a55df66c571de4525646e0b9762427353 /tdewallet/backend/tests/backendtest.cpp | |
parent | b7658a0d5eca24a9d37c6e04f88298ef02389db0 (diff) | |
download | tdelibs-dfe289850f068f19ba4a83ab4e7e22a7e09c13c9.tar.gz tdelibs-dfe289850f068f19ba4a83ab4e7e22a7e09c13c9.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdewallet/backend/tests/backendtest.cpp')
-rw-r--r-- | tdewallet/backend/tests/backendtest.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tdewallet/backend/tests/backendtest.cpp b/tdewallet/backend/tests/backendtest.cpp new file mode 100644 index 000000000..4e19ce43f --- /dev/null +++ b/tdewallet/backend/tests/backendtest.cpp @@ -0,0 +1,45 @@ +#include <stdlib.h> +#include <stdio.h> + +#include <kapplication.h> +#include <tqstring.h> + +#include "tdewalletbackend.h" + +int main(int argc, char **argv) { + TDEApplication a(argc, argv, "tdewalletbackendtest"); + + KWallet::Backend be("ktestwallet"); + printf("KWalletBackend constructed\n"); + + TQByteArray apass, bpass, cpass; + + apass.duplicate("apassword", 9); + bpass.duplicate("bpassword", 9); + cpass.duplicate("cpassword", 9); + + printf("Passwords initialised.\n"); + int rc = be.close(apass); + + printf("be.close(apass) returned %d (should be -255)\n", rc); + + rc = be.open(bpass); + + printf("be.open(bpass) returned %d (should be 0 or 1)\n", rc); + + rc = be.close(bpass); + + printf("be.close(bpass) returned %d (should be 0)\n", rc); + + rc = be.open(apass); + + printf("be.open(apass) returned %d (should be negative)\n", rc); + + rc = be.open(bpass); + + printf("be.open(bpass) returned %d (should be 0)\n", rc); + + return 0; +} + + |