You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/graph_construction_tests.jl
+12-17Lines changed: 12 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1729,10 +1729,9 @@ end
1729
1729
end
1730
1730
end
1731
1731
1732
-
@test_logs (
1733
-
:warn,
1734
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
1735
-
) create_model(test_model(y =1))
1732
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."create_model(
1733
+
test_model(y =1)
1734
+
)
1736
1735
1737
1736
@modelfunctiontest_model(y)
1738
1737
x ~Normal(0.0, 1.0)
@@ -1743,11 +1742,9 @@ end
1743
1742
end
1744
1743
end
1745
1744
1746
-
@test_logs (
1747
-
:warn,
1748
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
1749
-
) create_model(test_model(y =1))
1750
-
1745
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."create_model(
1746
+
test_model(y =1)
1747
+
)
1751
1748
@modelfunctiontest_model(y)
1752
1749
x ~Normal(0.0, 1.0)
1753
1750
if x <0
@@ -1757,10 +1754,9 @@ end
1757
1754
end
1758
1755
end
1759
1756
1760
-
@test_logs (
1761
-
:warn,
1762
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
1763
-
) create_model(test_model(y =1))
1757
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."create_model(
1758
+
test_model(y =1)
1759
+
)
1764
1760
1765
1761
@modelfunctiontest_model(y)
1766
1762
x ~Normal(0.0, 1.0)
@@ -1771,8 +1767,7 @@ end
1771
1767
end
1772
1768
end
1773
1769
1774
-
@test_logs (
1775
-
:warn,
1776
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
1777
-
) create_model(test_model(y =1))
1770
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."create_model(
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
846
-
) xref !=1
847
-
@test_logs (
848
-
:warn,
849
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
850
-
) 1!= xref
851
-
@test_logs (
852
-
:warn,
853
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
854
-
) xref ==1
855
-
@test_logs (
856
-
:warn,
857
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
858
-
) 1== xref
859
-
@test_logs (
860
-
:warn,
861
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
862
-
) xref >0
863
-
@test_logs (
864
-
:warn,
865
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
866
-
) 0< xref
867
-
@test_logs (
868
-
:warn,
869
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
870
-
) "something"== xref
871
-
@test_logs (
872
-
:warn,
873
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
874
-
) 10> xref
875
-
@test_logs (
876
-
:warn,
877
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
878
-
) xref <10
879
-
@test_logs (
880
-
:warn,
881
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
882
-
) 0<= xref
883
-
@test_logs (
884
-
:warn,
885
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
886
-
) xref >=0
887
-
@test_logs (
888
-
:warn,
889
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
890
-
) xref <=0
891
-
@test_logs (
892
-
:warn,
893
-
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."
894
-
) 0>= xref
843
+
@test_throws(
844
+
"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time.",
845
+
xref !=1
846
+
)
847
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."1!=
848
+
xref
849
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time." xref ==
850
+
1
851
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."1==
852
+
xref
853
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time." xref >
854
+
0
855
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."0<
856
+
xref
857
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time.""something"==
858
+
xref
859
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."10>
860
+
xref
861
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time." xref <
862
+
10
863
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."0<=
864
+
xref
865
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time." xref >=
866
+
0
867
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time." xref <=
868
+
0
869
+
@test_throws"Comparing Factor Graph variable `x` with a value. This is not possible as the value of `x` is not known at model construction time."0>=
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
900
-
) xref !=1
901
-
@test_logs (
902
-
:warn,
903
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
904
-
) 1!= xref
905
-
@test_logs (
906
-
:warn,
907
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
908
-
) xref ==1
909
-
@test_logs (
910
-
:warn,
911
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
912
-
) 1== xref
913
-
@test_logs (
914
-
:warn,
915
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
916
-
) xref >0
917
-
@test_logs (
918
-
:warn,
919
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
920
-
) 0< xref
921
-
@test_logs (
922
-
:warn,
923
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
924
-
) "something"== xref
925
-
@test_logs (
926
-
:warn,
927
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
928
-
) 10> xref
929
-
@test_logs (
930
-
:warn,
931
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
932
-
) xref <10
933
-
@test_logs (
934
-
:warn,
935
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
936
-
) 0<= xref
937
-
@test_logs (
938
-
:warn,
939
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
940
-
) xref >=0
941
-
@test_logs (
942
-
:warn,
943
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
944
-
) xref <=0
945
-
@test_logs (
946
-
:warn,
947
-
"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."
948
-
) 0>= xref
873
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time." xref !=
874
+
1
875
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."1!=
876
+
xref
877
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time." xref ==
878
+
1
879
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."1==
880
+
xref
881
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time." xref >
882
+
0
883
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."0<
884
+
xref
885
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time.""something"==
886
+
xref
887
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."10>
888
+
xref
889
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time." xref <
890
+
10
891
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."0<=
892
+
xref
893
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time." xref >=
894
+
0
895
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time." xref <=
896
+
0
897
+
@test_throws"Comparing Factor Graph variable `x[1,2]` with a value. This is not possible as the value of `x[1,2]` is not known at model construction time."0>=
0 commit comments