Skip to content

Commit

Permalink
adds some tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomRiem committed Sep 16, 2021
1 parent 56aa73c commit c4de5d5
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test/NFCT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ E_infty = norm(error_vector, Inf) / norm(fhat, 1)
@test E_2 < 10^(-10)
@test E_infty < 10^(-10)

# Error tests
# DomainError tests
@test_throws DomainError NFCT((-1, 2), M)

@test_throws DomainError NFCT(N, -1)
Expand All @@ -55,4 +55,15 @@ E_infty = norm(error_vector, Inf) / norm(fhat, 1)

@test_throws DomainError NFCT(N, M, (18, 10, 6), Int32(-8), f1_default, f2_default)

@test_throws DomainError NFCT((-16, 8, 4), M, (18, 10, 6), Int32(8), f1_default, f2_default)
@test_throws DomainError NFCT((-16, 8, 4), M, (18, 10, 6), Int32(8), f1_default, f2_default)

# error tests

N = (16, 8, 4)
M = 10000

p = NFCT(N, M)

p.init_done = false

@test_throws error nfct_finalize_plan(p)

0 comments on commit c4de5d5

Please sign in to comment.