Skip to content

Commit

Permalink
Forgot a test for #1843.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Jan 18, 2023
1 parent 51c2afe commit 8a399ab
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/issue1843.fut
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
let N_coating_coefs = i64.i32 8
let N_coating_specs = i64.i32 26
type coating = #AntiReflective
| #Mirror
| #Absorbing
| #PhaseGradient_IdealFocus {lam: f64, f: f64}
| #PhaseGradient_RotSym_Dispersive {lam_d: f64, phi0: [N_coating_coefs]f64, GD: [N_coating_coefs]f64, GDD: [N_coating_coefs]f64}

def parse_coatings (coating_list_array: [][N_coating_specs]f64): []coating =
let parse (specs: [N_coating_specs]f64) : coating =
let enum = i64.f64 specs[0]
in match enum
case 0 -> -- AntiReflective
#AntiReflective
case _ ->
#AntiReflective
in map parse coating_list_array

entry RayTrace (coating_list_array: [][N_coating_specs]f64) : []coating =
let coatings = parse_coatings coating_list_array
in coatings

0 comments on commit 8a399ab

Please sign in to comment.