Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
TestSpaceManager.cpp File Reference
#include <stdio.h>
#include "nscore.h"
#include "nsCRT.h"
#include "nsSpaceManager.h"

Go to the source code of this file.


class  MySpaceManager
struct  MySpaceManager::BandInfo
struct  MySpaceManager::BandsInfo


int main (int argc, char **argv)
 The Xalan testcases app.

Class Documentation

struct MySpaceManager::BandInfo

Definition at line 53 of file TestSpaceManager.cpp.

Class Members
BandRect * firstRect
nscoord height
PRIntn numRects
nscoord yOffset
struct MySpaceManager::BandsInfo

Definition at line 60 of file TestSpaceManager.cpp.

Collaboration diagram for MySpaceManager::BandsInfo:
Class Members
BandInfo bands
PRIntn numBands

Function Documentation

int main ( int  argc,
char **  argv 

The Xalan testcases app.

Definition at line 715 of file TestSpaceManager.cpp.

  // Create a space manager
  MySpaceManager* spaceMgr = new MySpaceManager(nsnull, nsnull);
  // Test adding rect regions
  if (!spaceMgr->TestAddBand()) {
    delete spaceMgr;
    return -1;

  // Test adding rect regions that overlap existing bands
  if (!spaceMgr->TestAddBandOverlap()) {
    delete spaceMgr;
    return -1;

  // Test adding rects within an existing band
  if (!spaceMgr->TestAddRectToBand()) {
    delete spaceMgr;
    return -1;

  // Test removing regions
  if (!spaceMgr->TestRemoveRegion()) {
    return -1;

  // Test getting the band data
  if (!spaceMgr->TestGetBandData()) {
    return -1;

  delete spaceMgr;
  return 0;

Here is the call graph for this function: