Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes
TestResult Class Reference

#include <ojiapitests.h>

Collaboration diagram for TestResult:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TestResult (StatusValue status, nsString comment)

Static Public Member Functions

static TestResultPASS (char *comment)
 added by raju
static TestResultFAIL (nsString comment)
static TestResultFAIL (char *method, nsresult rc)
static TestResultFAIL (char *method, char *comment, nsresult rc)
static TestResultFAIL (char *comment)

Public Attributes

StatusValue status
nsString comment

Detailed Description

Definition at line 115 of file ojiapitests.h.


Constructor & Destructor Documentation

TestResult::TestResult ( StatusValue  status,
nsString  comment 
) [inline]

Definition at line 159 of file ojiapitests.h.

                                                     {
    this->status = status;
    this->comment = comment;
  }

Here is the caller graph for this function:


Member Function Documentation

static TestResult* TestResult::FAIL ( nsString  comment) [inline, static]

Definition at line 133 of file ojiapitests.h.

                                            {
    return new TestResult(FAIL_value, comment); 
  }

Here is the call graph for this function:

Here is the caller graph for this function:

static TestResult* TestResult::FAIL ( char *  method,
nsresult  rc 
) [inline, static]

Definition at line 137 of file ojiapitests.h.

                                                     {
    char *comment = (char*)calloc(1, PL_strlen(method)+1024);
    sprintf(comment, "Method %s returned %X", method, rc);
    CBufDescriptor *bufDescr = new CBufDescriptor((const char*)comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
    nsString *str = new nsAutoString(*bufDescr);
    return new TestResult(FAIL_value, *str); 
  }

Here is the call graph for this function:

static TestResult* TestResult::FAIL ( char *  method,
char *  comment,
nsresult  rc 
) [inline, static]

Definition at line 145 of file ojiapitests.h.

                                                                    {
    char *outComment = (char*)calloc(1, PL_strlen(method)+1024);
    sprintf(outComment, "Method %s returned %X: %s", method, rc, comment);
    CBufDescriptor *bufDescr = new CBufDescriptor((const char*)comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
    nsString *str = new nsAutoString(*bufDescr);
    return new TestResult(FAIL_value, *str); 
  }

Here is the call graph for this function:

static TestResult* TestResult::FAIL ( char *  comment) [inline, static]

Definition at line 153 of file ojiapitests.h.

                                         {
      CBufDescriptor *bufDescr = new CBufDescriptor((const char*)comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
      nsString *str = new nsAutoString(*bufDescr);
      return new TestResult(FAIL_value, *str); 
  }

Here is the call graph for this function:

static TestResult* TestResult::PASS ( char *  comment) [inline, static]

added by raju

Definition at line 125 of file ojiapitests.h.

                                         {
    char *msg = (char*)calloc(1, PL_strlen(comment)+1024);
    sprintf(msg, "Method %s", comment);
    CBufDescriptor *bufDescr = new CBufDescriptor((const char*)msg, PR_FALSE, PL_strlen(msg)+1, PL_strlen(msg));
    nsString *str = new nsAutoString(*bufDescr);
    return new TestResult(PASS_value, *str); 
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 165 of file ojiapitests.h.

Definition at line 164 of file ojiapitests.h.


The documentation for this class was generated from the following file: