Some tests for drawing methods in the Canvas class.
|
Canvas |
drawCells should draw cells on CPM
|
- |
drawCells should draw cells on CA
|
- |
drawOnCellBorders should draw borders on CPM
|
- |
drawOnCellBorders should draw borders on CA
|
- |
drawCellBorders should work on CPM and CA
|
- |
Some tests for the DiceSet class.
|
DiceSet |
should start empty
|
- |
should be empty after an element is added and removed
|
- |
Rigorous tests for Grid2D-specific methods. See GridExtensionSpec.js for
more general tests.
|
Grid2D |
[ unit tests ]
|
- |
pixelsi generator reports correct IndexCoordinates
|
Grid2D#pixelsi |
neighi method should return same results as neighiSimple
|
Grid2D#neighi
Grid2D#neighiSimple |
neighi method should return correct neighbors for specific cases:
|
Grid2D#neighi |
...corner [0,0]
|
- |
...corner [xMax,0]
|
- |
...corner [0,yMax]
|
- |
...corner [xMax,yMax]
|
- |
neighNeumanni method should return correct neighbors
|
Grid2D#neighNeumanni |
neighNeumanni method should return correct neighbors for specific cases:
|
Grid2D#neighNeumanni |
...corner [0,0]
|
- |
...corner [xMax,0]
|
- |
...corner [0,yMax]
|
- |
...corner [xMax,yMax]
|
- |
gradienti method should return correct gradients
|
Grid2D#gradienti |
Rigorous tests for Grid3D-specific methods. See GridExtensionSpec.js for
more general tests.
|
Grid3D |
[ unit tests ]
|
- |
pixelsi generator reports correct IndexCoordinates
|
Grid3D#pixelsi |
neighi method should return correct neighbors for specific cases:
|
Grid3D#neighi |
...corner [0,0,0]
|
- |
...corner [xMax,yMax,zMax]
|
- |
General tests that every Grid subclass should pass
|
Grid2D
Grid3D |
spec/grid/GridExtensionSpec.js |
- |
should all have a _pixelArray
|
- |
should all have a p2i method
|
- |
should all have an i2p method
|
- |
i2p and p2i should be inverse for valid grid coordinates
|
Grid2D#i2p
Grid2D#p2i
Grid3D#p2i
Grid3D#i2p |
should all have a neighi method
|
- |
should all have pixels(i) generator methods
|
- |
Grid subclasses supporting diffusion.
|
Grid2D |
spec/grid/GridExtensionSpec.js |
- |
should support a Float datatype
|
- |
should be able to store Floating point and negative numbers
|
- |
should have a gradienti method
|
- |
should have a neighNeumanni generator
|
- |
Tests for Grid Manipulator
|
GridManipulator |
[ unit tests ]
|
- |
seedCellAt should not throw error normally
|
GridManipulator#seedCellAt |
seedCellAt should throw error when trying to seed outside of grid
|
- |
should remove a cellID from the grid
|
GridManipulator#killCell |
should not mess up cellKinds etc
|
- |
Grid
|
Grid |
[ unit tests ]
|
- |
constructor
|
Grid#constructor |
should throw an error when torus is specified for an incorrect number of dimensions
|
- |
should set a size for each dimension
|
- |
should set a torus property in each dimension
|
- |
should by default set torus = true in each dimension
|
- |
should be able to handle different torus settings for each dimension
|
- |
should be able to handle a different size in each dimension
|
- |
should compute a midpoint at the correct position
|
- |
neigh method
|
Grid#neigh |
should return an array coordinate
|
- |
should listen to torus for each dimension
|
- |
setpix(i) methods
|
Grid#setpix
Grid#setpixi |
can be called
|
Grid#setpix
Grid#setpixi |
should prohibit setting an invalid type on the grid to avoid bugs
|
Grid#setpix
Grid#setpixi
Grid#_isValidValue |
store values in the Grid correctly
|
Grid#setpix
Grid#setpixi |
pixt(i) methods
|
Grid#pixt
Grid#pixti |
pixt(i) can show types on the grid.
|
Grid#pixt
Grid#pixti |
pixelsBuffer method
|
Grid#pixelsBuffer |
should work on Float32 and Uint16 grids
|
- |
laplacian(i) method
|
Grid#laplaciani |
should work on Float32 grids
|
- |
should throw error when you try to call it on Uint16 grid
|
- |
should compute laplacian correctly
|
- |
case 1 : everything zero
|
- |
case 2 : everything a positive value
|
- |
case 3 : everything a negative value
|
- |
case 4 : floating point values
|
- |
case 4 : positive and negative floating point values
|
- |
diffusion method
|
Grid#diffusion |
can be called on Float32 grids
|
- |
should throw error when you try to call it on Uint16 grid
|
- |
[ class extension ]
|
- |
should be possible to extend with a method
|
- |
should be possible to build a custom Grid subclass
|
- |
should throw an error when _pixelArray is not set in subclass
|
Grid#_pixels |
superclass should throw error when p2i/i2p not implemented
|
Grid#p2i
Grid#i2p |
should throw error when neighi not implemented
|
Grid#neigh |
should throw error when pixels/pixelsi not implemented
|
Grid#pixels |
should throw error when gradienti not implemented
|
Grid#gradient |
gradient should work as soon as gradienti and p2i are implemented.
|
Grid#gradient |
laplaciani should throw error when neighNeumanni not implemented
|
Grid#laplacian
Grid#laplaciani |
laplacian should throw error when p2i/neighNeumanni not implemented
|
Grid#laplacian
Grid#laplaciani |
laplacian(i) should work if p2i, neighNeumanni, and _pixelArray exist
|
Grid#laplacian
Grid#laplaciani |
LocalConnectivityConstraint
|
LocalConnectivityConstraint |
[ Unit tests ]
|
- |
method [ connectedComponentsOf ]
|
LocalConnectivityConstraint#connectedComponentsOf |
should return only one component in connected case
|
- |
should return multiple components in disconnected case
|
- |
[ Integration tests ]
|
- |
integration with ParameterChecker
|
LocalConnectivityConstraint#confChecker |
should throw an error when CONNECTED parameter is unspecified
|
- |
when copy attempt would disrupt local connectivity
|
- |
#checkConnected should return false
|
LocalConnectivityConstraint#checkConnected |
and when CONNECTED for the tgt cellKind
|
LocalConnectivityConstraint#fulfilled |
is true, constraint should not be fulfilled
|
- |
is false, constraint should be fulfilled
|
- |
method [ connectedComponentsOf ]
|
- |
should listen to the grid torus property correctly
|
- |
Tests for Perimeter Constraint
|
PerimeterConstraint |
[ unit tests ]
|
- |
can be added to a non-empty grid without crashing:
|
PerimeterConstraint |
can be added automatically through the conf object
|
- |
Tests for Persistence Constraint
|
PersistenceConstraint |
[ unit tests ]
|
- |
does not crash when cell doesn't move for a while:
|
PersistenceConstraint |
SoftLocalConnectivityConstraint
|
- |
should throw an error when LAMBDA_CONNECTIVITY parameter is not specified
|
- |
should throw an error when NBH_TYPE is set incorrectly
|
- |
when computing connected components
|
- |
should return only one component in connected case
|
- |
should return multiple components in disconnected case
|
- |
should listen to the neighborhood type property correctly
|
- |
should listen to the grid torus property correctly
|
- |
when copy attempt would disrupt local connectivity
|
- |
#checkConnected should return 1
|
- |
and when LAMBDA_CONNECTIVITY for the tgt celltype
|
- |
is non-zero, constraint should return positive deltaH
|
- |
is zero, constraint should return deltaH zero
|
- |
Some tests for the CPM class.
|
CPM |
[ Unit tests ]
|
- |
method [ setpixi ]
|
CPM#setpixi |
shouldn't mess up cell kinds
|
- |
shouldn't mess up cell kinds if called twice on same pixel
|
- |
Tests for Simulation class.
|
Simulation |
[ unit tests ]
|
- |
drawCanvas has sensible defaults:
|
Simulation#drawCanvas |
should not throw error if ACTCOLOR undefined
|
- |
initializeGrid method:
|
Simulation#initializeGrid |
should correctly clear up stats if called twice
|
- |
should reset C if called twice
|
- |