LTSpice: Pass/Fail in Error Log if Voltage < Constant Reference
I did this with 1 bsource and an SR-latch. The results are shown below, the first source is just a sine wave with increasing amplitude. The second b-source detects whether the threshold is above 7mV (vout2 node) and the latch triggers the first time vout2 goes high and then stays high. Then measure it at the end of the file.

This is not the same logic that you want but the functionality is the same. I don't see a way to do this with only b-sources, my attempts by using a delay yielded results with NaN's (which I didn't even know LT spice could produce until now).

* C:\Draft7.asc
B1 Vout 0 V=time*0.01*sin(2*pi*time*10)
B2 Vout2 0 V=if(V(vout)&lt;0.007,0,1)
A1 Vout2 0 0 0 0 0 Vout3 0 SRFLOP
.tran 1
.backanno
.end


If you wanted to you could use the netlist below to generate a part so it you could include it in other files and containerize it. 

B2 Vinternal 0 V=if(V(Vin)&lt;V(condition),0,1)
A1 Vinternal 0 0 0 0 0 test_result 0 SRFLOP


You cannot do what you describe with a .meas statment (which is why I posted the first example):

The only option with a .meas statement is to have a conditional

.meas TRAN x FIND time WHEN V(vout)=0.007 CROSS=1


or rise would work as well (which measures the time of the rising edge)

.meas TRAN x FIND time WHEN V(vout)=0.007 RISE=1


from the above example this prints out the time of the first crossing of vout, that isn't what you want, you want a pass/fail.

So you run the cross

.meas TRAN xx FIND if(time&lt;1,0,1) WHEN V(vout2)=0.007 CROSS=1


This is the output of the simulator not exactly what you want but it does have a conditional


  xx: if(time&lt;1,0,1)=0 at 0.721136


However what happens if there isn't a crossing? If we change cross to 8 (there are only six crossings) it does not meet the condition.

.meas TRAN x FIND time WHEN V(vout)=0.007 CROSS=8


This is what the simulator outputs:


  Measurement "x" FAIL'ed


There isn't a way to measure when a CROSS or a RISE fails because when the .meas statement does not find the condition it fails the whole condition so there is only a way to find if a condition is met by using .meas statements. If the condition fails, you don't know why it failed only that it did fail.