@@ -15,6 +15,21 @@ abstract contract Logging {
1515 event LogAddress (string prefix , string description , address data );
1616 event LogBool (string description , bool data );
1717 event LogBool (string prefix , string description , bool data );
18+
19+ event AssertionFailed ();
20+ event AssertionFailed (string description );
21+ event AssertionFailed (string description , string data );
22+ event AssertionFailed (string prefix , string description , string data );
23+ event AssertionFailed (string description , bytes data );
24+ event AssertionFailed (string prefix , string description , bytes data );
25+ event AssertionFailed (string description , uint256 data );
26+ event AssertionFailed (string prefix , string description , uint256 data );
27+ event AssertionFailed (string description , int256 data );
28+ event AssertionFailed (string prefix , string description , int256 data );
29+ event AssertionFailed (string description , address data );
30+ event AssertionFailed (string prefix , string description , address data );
31+ event AssertionFailed (string description , bool data );
32+ event AssertionFailed (string prefix , string description , bool data );
1833
1934 function log (string memory debugString ) internal {
2035 emit Log (debugString);
@@ -91,4 +106,84 @@ abstract contract Logging {
91106 ) internal {
92107 emit LogBool (prefix, description, data);
93108 }
109+
110+ function logFail () internal {
111+ emit AssertionFailed ();
112+ }
113+
114+ function logFail (string memory debugString ) internal {
115+ emit AssertionFailed (debugString);
116+ }
117+
118+ function logFail (string memory description , string memory data ) internal {
119+ emit AssertionFailed (description, data);
120+ }
121+
122+ function logFail (
123+ string memory prefix ,
124+ string memory description ,
125+ string memory data
126+ ) internal {
127+ emit AssertionFailed (prefix, description, data);
128+ }
129+
130+ function logFail (string memory description , bytes memory data ) internal {
131+ emit AssertionFailed (description, data);
132+ }
133+
134+ function logFail (
135+ string memory prefix ,
136+ string memory description ,
137+ bytes memory data
138+ ) internal {
139+ emit AssertionFailed (prefix, description, data);
140+ }
141+
142+ function logFail (string memory description , uint256 data ) internal {
143+ emit AssertionFailed (description, data);
144+ }
145+
146+ function logFail (
147+ string memory prefix ,
148+ string memory description ,
149+ uint256 data
150+ ) internal {
151+ emit AssertionFailed (prefix, description, data);
152+ }
153+
154+ function logFail (string memory description , int256 data ) internal {
155+ emit AssertionFailed (description, data);
156+ }
157+
158+ function logFail (
159+ string memory prefix ,
160+ string memory description ,
161+ int256 data
162+ ) internal {
163+ emit AssertionFailed (prefix, description, data);
164+ }
165+
166+ function logFail (string memory description , address data ) internal {
167+ emit AssertionFailed (description, data);
168+ }
169+
170+ function logFail (
171+ string memory prefix ,
172+ string memory description ,
173+ address data
174+ ) internal {
175+ emit AssertionFailed (prefix, description, data);
176+ }
177+
178+ function logFail (string memory description , bool data ) internal {
179+ emit AssertionFailed (description, data);
180+ }
181+
182+ function logFail (
183+ string memory prefix ,
184+ string memory description ,
185+ bool data
186+ ) internal {
187+ emit AssertionFailed (prefix, description, data);
188+ }
94189}
0 commit comments