@@ -46,14 +46,13 @@ function test_params_api(semobj, spec::SemSpecification)
4646 @test @inferred (param_labels (semobj)) == param_labels (spec)
4747end
4848
49- @testset " Sem(implied=$impliedtype , loss=$losstype )" for impliedtype in (RAM, RAMSymbolic),
50- losstype in (SemML, SemWLS)
49+ @testset " Sem(implied=$impliedtype , loss=SemML)" for impliedtype in (RAM, RAMSymbolic)
5150
5251 model = Sem (
5352 specification = ram_matrices,
5453 observed = obs,
5554 implied = impliedtype,
56- loss = losstype ,
55+ loss = SemML ,
5756 )
5857
5958 @test model isa Sem
6867
6968 @test @inferred (loss (model)) isa SemLoss
7069 semloss = loss (model). functions[1 ]
71- @test semloss isa losstype
70+ @test semloss isa SemML
7271
7372 @test @inferred (nsamples (model)) == nsamples (obs)
7473end
74+
75+ @testset " Sem(implied=RAMSymbolic, loss=SemWLS)" begin
76+
77+ model = Sem (
78+ specification = ram_matrices,
79+ observed = obs,
80+ implied = RAMSymbolic,
81+ loss = SemWLS,
82+ )
83+
84+ @test model isa Sem
85+ @test @inferred (implied (model)) isa RAMSymbolic
86+ @test @inferred (observed (model)) isa SemObserved
87+
88+ test_vars_api (model, ram_matrices)
89+ test_params_api (model, ram_matrices)
90+
91+ test_vars_api (implied (model), ram_matrices)
92+ test_params_api (implied (model), ram_matrices)
93+
94+ @test @inferred (loss (model)) isa SemLoss
95+ semloss = loss (model). functions[1 ]
96+ @test semloss isa SemWLS
97+
98+ @test @inferred (nsamples (model)) == nsamples (obs)
99+ end
0 commit comments