Skip to content

Commit

Permalink
Forgot to add the new test files.
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Apr 7, 2011
1 parent c7b9066 commit 3459787
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/matrix.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
open OUnit

let suite = [
]
19 changes: 19 additions & 0 deletions tests/vectors.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
open OUnit
open Numcaml

let one = Math.ones [10]

let test_add () =
let x = $(3.3 + one) in
let y = Math.Vector (Array.create 10 (Math.Float 4.3)) in
"values match" @? (x=y)

let test_mul () =
let x = $(7l * one) in
let y = Math.Vector (Array.create 10 (Math.Int32 7l)) in
"value match" @? (x=y)

let suite = [
"vector_add" >:: test_add;
"vector_mul" >:: test_mul;
]

0 comments on commit 3459787

Please sign in to comment.