public void Fneg_ParseCheck() { LFneg fneg = new LFneg(_op1, _result); Assert.AreEqual($"{_result.Identifier} = fneg {_result.ParseType()} {_op1.ValueOrIdentifier}", LHelper.Trim(fneg.ParseInstruction())); }
public void Fneg_ParseCheck_FastMathFlags() { LFneg fneg = new LFneg(_op1, _result); fneg.Flags.Add(LFastMathFlags.fast); Assert.AreEqual($"{_result.Identifier} = fneg {LFastMathFlags.fast.Parse()} {_result.ParseType()} {_op1.ValueOrIdentifier}", LHelper.Trim(fneg.ParseInstruction())); }
public void SimpleFneg_ResultInt32_Exception() { LFneg fneg; Assert.Throws <Exception>(() => fneg = new LFneg(_op1, new LValueRef(LType.Int32Type(), "%result")) ); }
public void SimpleFneg_ResultHasNoIdentifier_Exception() { LFneg fneg; Assert.Throws <Exception>(() => fneg = new LFneg(_op1, new LValueRef(LType.F32Type(), "1.000000e+00")) ); }
public void SimpleFneg_Op1Int32_Exception() { LFneg fneg; Assert.Throws <Exception>(() => fneg = new LFneg(new LValueRef(LType.Int32Type(), "%result"), _result) ); }