Ejemplo n.º 1
0
 public void WriteDoubleTest()
 {
     Assert.Equal("1.0", DxfWriter.DoubleAsString(1.0));
     Assert.Equal("1.000005", DxfWriter.DoubleAsString(1.000005));
     Assert.Equal("-1.0", DxfWriter.DoubleAsString(-1.0));
     Assert.Equal("-1.000005", DxfWriter.DoubleAsString(-1.000005));
     Assert.Equal("1500000000000000.0", DxfWriter.DoubleAsString(1.5e15));
 }
Ejemplo n.º 2
0
        public void WriteAsciiWithInvariantCultureTest()
        {
            var existingCulture = CultureInfo.CurrentCulture;

            try
            {
                CultureInfo.CurrentCulture = new CultureInfo("de-DE");
                Assert.Equal("3.5", DxfWriter.DoubleAsString(3.5));
            }
            finally
            {
                CultureInfo.CurrentCulture = existingCulture;
            }
        }