#include <iostream>

#include "moz.h"
#include "nsexception.h"

using namespace std;

nsresult test();

nsresult test() {
  if (1) {
    return NS_ERROR_OUT_OF_MEMORY;
  }
  return NS_OK;
}

int main(int argc, char **argv) {
  nsresult rv = test();
  if (NS_FAILED(rv)) {
    cerr << argv[0] << ": got error =D" << endl;
    return 0;
  } 
  
  cerr << "error was expected" << endl;
  return 1;
}
