public void IsFinite_WithDoubleNegativeInfinity_ReturnFalse() { // arrange const double Value = double.NegativeInfinity; // action var isFinite = ScalarPrimitives <double, double> .IsFiniteFunc(Value); // assert Assert.IsFalse(isFinite); }
public void Sqrt_Double_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Sqrt(9); // assert Assert.AreEqual(3.0, result); }
public void Add_Double_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Add(3.0, 4.0); // assert Assert.AreEqual(7.0, result); }
public void Atan_Int_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Atan(-2); // assert Assert.AreEqual(-1, result); }
public void Tanh_Int_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Tanh(1); // assert Assert.AreEqual(0, result); }
public void Exp_Double_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Exp(1); // assert Assert.AreEqual(Math.E, result); }
public void Cos_Int_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Cos(0); // assert Assert.AreEqual(1, result); }
public void Divide_NegativeDoubleDivideByZero_ReturnNegativeInfinity() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Divide(-3.0, 0.0); // assert Assert.AreEqual(double.NegativeInfinity, result); }
public void Divide_DoubleDivide_ReturnNan() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Divide(0.0, 0.0); // assert Assert.AreEqual(double.NaN, result); }
public void Multiply_Int_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Multiply(3, 4); // assert Assert.AreEqual(12, result); }
public void Divide_Double_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Divide(3.0, 4.0); // assert Assert.AreEqual(0.75, result); }
public void IsFinite_WithFloatNegativeInfinity_ReturnFalse() { // arrange const float Value = float.NegativeInfinity; // action var isFinite = ScalarPrimitives <float, float> .IsFiniteFunc(Value); // assert Assert.IsFalse(isFinite); }
public void Subtract_Double_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Subtract(3, 4); // assert Assert.AreEqual(-1.0, result); }
public void IsFinite_WithFloatValue_ReturnTrue() { // arrange const float Value = 1.0f; // action var isFinite = ScalarPrimitives <float, float> .IsFiniteFunc(Value); // assert Assert.IsTrue(isFinite); }
public void Log_DoubleNegative_ReturnNan() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Log(-1.0); // assert Assert.AreEqual(double.NaN, result); }
public void Modulo_IntCase2_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Modulo(4, 3); // assert Assert.AreEqual(1, result); }
public void Log10_Double_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Log10(10); // assert Assert.AreEqual(1.0, result); }
public void Modulo_DoubleCase2_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Modulo(4.0, 3.0); // assert Assert.AreEqual(1.0, result); }
public void Sin_Double_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Sin(Math.PI / 2.0); // assert Assert.AreEqual(1.0, result); }
public void Modulo_DoubleByZero_ReturnNan() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Modulo(4.0, 0.0); // assert Assert.AreEqual(double.NaN, result); }
public void Cos_Double_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Cos(Math.PI); // assert Assert.AreEqual(-1.0, result); }
public void Sign_IntNegative_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Sign(-3); // assert Assert.AreEqual(-1, result); }
public void Add_Int_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Add(3, 4); // assert Assert.AreEqual(7, result); }
public void Sign_DoubleNegative_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Sign(-3.0); // assert Assert.AreEqual(-1.0, result); }
public void Sqrt_Int_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Sqrt(9); // assert Assert.AreEqual(3, result); }
public void Log_Double0_ReturnNegativeInfinity() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Log(0.0); // assert Assert.AreEqual(double.NegativeInfinity, result); }
public void Ceiling_Int_ReturnInt() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Ceiling(9); // assert Assert.AreEqual(9, result); }
public void Log_IntNegative_ReturnIntMin() { // arrange var sp = new ScalarPrimitives <int, int>(); // action var result = sp.Log(-1); // assert Assert.AreEqual(int.MinValue, result); }
public void Ceiling_DoublePositive_ReturnDouble() { // arrange var sp = new ScalarPrimitives <double, double>(); // action var result = sp.Ceiling(1.01); // assert Assert.AreEqual(2.0, result); }
public void IsFinite_WithDoubleValue_ReturnTrue() { // arrange const double Value = 1.0; // action var isFinite = ScalarPrimitives <double, double> .IsFiniteFunc(Value); // assert Assert.IsTrue(isFinite); }