xpcom/tests/TestArguments.cpp

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

     1 #include <string.h>
     3 int main(int argc, char* argv[]) {
     4   if (argc != 9)
     5       return -1;
     7   if (strcmp("mozilla", argv[1]) != 0)
     8       return 1;
     9   if (strcmp("firefox", argv[2]) != 0)
    10       return 2;
    11   if (strcmp("thunderbird", argv[3]) != 0)
    12       return 3;
    13   if (strcmp("seamonkey", argv[4]) != 0)
    14       return 4;
    15   if (strcmp("foo", argv[5]) != 0)
    16       return 5;
    17   if (strcmp("bar", argv[6]) != 0)
    18       return 6;
    19   if (strcmp("argument with spaces", argv[7]) != 0)
    20       return 7;
    21   if (strcmp("\"argument with quotes\"", argv[8]) != 0)
    22       return 8;
    24   return 0;
    25 } 

mercurial