Skip to content

Instantly share code, notes, and snippets.

@jashwanth9
Created June 15, 2012 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jashwanth9/2938111 to your computer and use it in GitHub Desktop.
Save jashwanth9/2938111 to your computer and use it in GitHub Desktop.
firsttest
$load "rosella/test.pbc";
//$load "./src/mat.pbc";
class MyTests {
function first_test() {
var pla = loadlib("linalg_group");
var identity_matrix=new 'NumMatrix2D';
identity_matrix.initialize_from_args(1,1,
1.0);
self.assert.equal(identity_matrix.rows, 1);
self.assert.equal(identity_matrix.cols, 1);
self.assert.equal(identity_matrix[0, 0], 1);
}
}
function main[main](var args) {
using Rosella.Test.test;
test(class MyTests);
}
OUTPUT:
WARNING: class NumMatrix2D not found at compile time near 'NumMatrix2D' at dgetrf.t line 9
1..1
ok 1 - first_test
# You passed all 1 tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment