mirror of https://github.com/KLayout/klayout.git
MSVC does not assume UTF-8 encoding by default, hence use explicit bytes
This commit is contained in:
parent
fb16c8c6f6
commit
534b33be1c
|
|
@ -34,9 +34,9 @@ std::string
|
||||||
RExtractorTechVia::to_string () const
|
RExtractorTechVia::to_string () const
|
||||||
{
|
{
|
||||||
std::string res = "Via(";
|
std::string res = "Via(";
|
||||||
res += tl::sprintf ("bottom=L%u, cut=L%u, top=L%u, R=%.12gµm²*Ohm", bottom_conductor, cut_layer, top_conductor, resistance);
|
res += tl::sprintf ("bottom=L%u, cut=L%u, top=L%u, R=%.12g \xC2\xB5m\xC2\xB2*Ohm", bottom_conductor, cut_layer, top_conductor, resistance);
|
||||||
if (merge_distance > 1e-10) {
|
if (merge_distance > 1e-10) {
|
||||||
res += tl::sprintf(", d_merge=%.12gµm", merge_distance);
|
res += tl::sprintf(", d_merge=%.12g \xC2\xB5m", merge_distance);
|
||||||
}
|
}
|
||||||
res += ")";
|
res += ")";
|
||||||
return res;
|
return res;
|
||||||
|
|
@ -48,7 +48,7 @@ std::string
|
||||||
RExtractorTechConductor::to_string () const
|
RExtractorTechConductor::to_string () const
|
||||||
{
|
{
|
||||||
std::string res = "Conductor(";
|
std::string res = "Conductor(";
|
||||||
res += tl::sprintf ("layer=L%u, R=%.12gOhm/sq", layer, resistance);
|
res += tl::sprintf ("layer=L%u, R=%.12g Ohm/sq", layer, resistance);
|
||||||
|
|
||||||
switch (algorithm) {
|
switch (algorithm) {
|
||||||
case SquareCounting:
|
case SquareCounting:
|
||||||
|
|
@ -62,11 +62,11 @@ RExtractorTechConductor::to_string () const
|
||||||
}
|
}
|
||||||
|
|
||||||
if (triangulation_min_b > 1e-10) {
|
if (triangulation_min_b > 1e-10) {
|
||||||
res += tl::sprintf(", tri_min_b=%.12gµm", triangulation_min_b);
|
res += tl::sprintf(", tri_min_b=%.12g \xC2\xB5m", triangulation_min_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (triangulation_max_area > 1e-10) {
|
if (triangulation_max_area > 1e-10) {
|
||||||
res += tl::sprintf(", tri_max_area=%.12gµm", triangulation_max_area);
|
res += tl::sprintf(", tri_max_area=%.12g \xC2\xB5m\xC2\xB2", triangulation_max_area);
|
||||||
}
|
}
|
||||||
|
|
||||||
res += ")";
|
res += ")";
|
||||||
|
|
|
||||||
|
|
@ -96,10 +96,10 @@ TEST(basic)
|
||||||
tech.skip_simplify = true;
|
tech.skip_simplify = true;
|
||||||
|
|
||||||
EXPECT_EQ (tech.to_string (),
|
EXPECT_EQ (tech.to_string (),
|
||||||
"skip_simplify=true\n"
|
u8"skip_simplify=true\n"
|
||||||
"Via(bottom=L1, cut=L1, top=L1, R=2µm²*Ohm, d_merge=0.2µm)\n"
|
u8"Via(bottom=L1, cut=L1, top=L1, R=2 \xC2\xB5m\xC2\xB2*Ohm, d_merge=0.2 \xC2\xB5m)\n"
|
||||||
"Conductor(layer=L1, R=0.5Ohm/sq, algo=SquareCounting)\n"
|
u8"Conductor(layer=L1, R=0.5 Ohm/sq, algo=SquareCounting)\n"
|
||||||
"Conductor(layer=L1, R=0.25Ohm/sq, algo=Tesselation, tri_min_b=0.5µm, tri_max_area=1.5µm)"
|
u8"Conductor(layer=L1, R=0.25 Ohm/sq, algo=Tesselation, tri_min_b=0.5 \xC2\xB5m, tri_max_area=1.5 \xC2\xB5m\xC2\xB2)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ class PEX_TestClass < TestBase
|
||||||
via1.top_conductor = l3
|
via1.top_conductor = l3
|
||||||
via1.resistance = 2.0
|
via1.resistance = 2.0
|
||||||
via1.merge_distance = 0.2
|
via1.merge_distance = 0.2
|
||||||
assert_equal(via1.to_s, "Via(bottom=L1, cut=L2, top=L3, R=2µm²*Ohm, d_merge=0.2µm)")
|
assert_equal(via1.to_s, "Via(bottom=L1, cut=L2, top=L3, R=2 µm²*Ohm, d_merge=0.2 µm)")
|
||||||
|
|
||||||
assert_equal(via1.bottom_conductor, l1)
|
assert_equal(via1.bottom_conductor, l1)
|
||||||
assert_equal(via1.cut_layer, l2)
|
assert_equal(via1.cut_layer, l2)
|
||||||
|
|
@ -162,7 +162,7 @@ class PEX_TestClass < TestBase
|
||||||
cond1 = RBA::RExtractorTechConductor::new
|
cond1 = RBA::RExtractorTechConductor::new
|
||||||
cond1.layer = l1
|
cond1.layer = l1
|
||||||
cond1.resistance = 0.5
|
cond1.resistance = 0.5
|
||||||
assert_equal(cond1.to_s, "Conductor(layer=L1, R=0.5Ohm/sq, algo=SquareCounting)")
|
assert_equal(cond1.to_s, "Conductor(layer=L1, R=0.5 Ohm/sq, algo=SquareCounting)")
|
||||||
|
|
||||||
assert_equal(cond1.layer, l1)
|
assert_equal(cond1.layer, l1)
|
||||||
assert_equal(cond1.resistance, 0.5)
|
assert_equal(cond1.resistance, 0.5)
|
||||||
|
|
@ -174,8 +174,8 @@ class PEX_TestClass < TestBase
|
||||||
tech.add_conductor(cond2)
|
tech.add_conductor(cond2)
|
||||||
assert_equal(tech.each_conductor.collect { |c| c.layer }, [ l3 ])
|
assert_equal(tech.each_conductor.collect { |c| c.layer }, [ l3 ])
|
||||||
assert_equal(tech.to_s,
|
assert_equal(tech.to_s,
|
||||||
"Via(bottom=L1, cut=L2, top=L3, R=2µm²*Ohm, d_merge=0.2µm)\n" +
|
"Via(bottom=L1, cut=L2, top=L3, R=2 µm²*Ohm, d_merge=0.2 µm)\n" +
|
||||||
"Conductor(layer=L3, R=0.25Ohm/sq, algo=SquareCounting)"
|
"Conductor(layer=L3, R=0.25 Ohm/sq, algo=SquareCounting)"
|
||||||
)
|
)
|
||||||
|
|
||||||
tech.clear_conductors
|
tech.clear_conductors
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue