Skip to content

Commit

Permalink
Fixing a typo and trailing spaces
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Wagner <[email protected]>
  • Loading branch information
WagnerMarcos committed Aug 31, 2021
1 parent 4cb070c commit c0f01b6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/python/Line2.i
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ namespace ignition
}
}

%extend Line2
%extend Line2
{
std::string __str__() const {
std::ostringstream out;
out << *$self;
return out.str();
}
}

%template(Line2i) Line2<int>;
%template(Line2d) Line2<double>;
%template(Line2f) Line2<float>;
Expand Down
3 changes: 2 additions & 1 deletion src/python/Line3_TEST.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def test_direction(self):
line_a = Line3d(1, 1, 1, 0, 0, 0)
line_b = Line3d(2, 2, 2, 0, 0, 0)
line_c = Line3d(0, 0, 0, 1, 1, 1)
self.assertTrue(line_a.direction() == (line_a[1] - line_a[0]).normalize())
self.assertTrue(line_a.direction() ==
(line_a[1] - line_a[0]).normalize())
self.assertTrue(line_a.direction() == line_b.direction())
self.assertFalse(line_a.direction() == line_c.direction())

Expand Down
14 changes: 7 additions & 7 deletions src/python/SignalStats.i
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace ignition
namespace math
{
class SignalMaximum
{
{
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) "";
public: virtual void Reset();
public: virtual size_t Count() const;
Expand All @@ -40,7 +40,7 @@ namespace ignition
};

class SignalMean
{
{
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) "";
public: virtual void Reset();
public: virtual size_t Count() const;
Expand All @@ -50,7 +50,7 @@ namespace ignition
};

class SignalMinimum
{
{
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) "";
public: virtual void Reset();
public: virtual size_t Count() const;
Expand All @@ -60,7 +60,7 @@ namespace ignition
};

class SignalRootMeanSquare
{
{
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) "";
public: virtual void Reset();
public: virtual size_t Count() const;
Expand All @@ -70,7 +70,7 @@ namespace ignition
};

class SignalMaxAbsoluteValue
{
{
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) "";
public: virtual void Reset();
public: virtual size_t Count() const;
Expand All @@ -80,7 +80,7 @@ namespace ignition
};

class SignalVariance
{
{
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) "";
public: virtual void Reset();
public: virtual size_t Count() const;
Expand All @@ -90,7 +90,7 @@ namespace ignition
};

class SignalStats
{
{
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) "";
public: SignalStats();
public: ~SignalStats();
Expand Down
6 changes: 3 additions & 3 deletions src/python/Temperature.i
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace ignition
namespace math
{
class Temperature
{
{
%rename("%(undercase)s", %$isfunction, %$ismember, %$not %$isconstructor) "";
public: Temperature();
public: Temperature(const double _temp);
Expand Down Expand Up @@ -75,8 +75,8 @@ namespace ignition
public: bool operator>=(const Temperature &_temp) const;
public: bool operator>=(const double _temp) const;
};
%extend Temperature

%extend Temperature
{
std::string __str__() const {
std::ostringstream out;
Expand Down
8 changes: 4 additions & 4 deletions src/python/Temperature_TEST.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class TestTemperature(unittest.TestCase):

def test_temperatur_constructor(self):
def test_temperature_constructor(self):
temp = Temperature()
self.assertAlmostEqual(temp.kelvin(), 0.0, 1e-6)

Expand Down Expand Up @@ -46,7 +46,7 @@ def test_temperatur_constructor(self):
self.assertFalse(temp >= 0.1)
self.assertTrue(temp >= 0.0)

def test_temperatur_conversions(self):
def test_temperature_conversions(self):
self.assertAlmostEqual(Temperature.kelvin_to_celsius(0), -273.15,
delta=1e-6)
self.assertAlmostEqual(Temperature.kelvin_to_fahrenheit(300), 80.33,
Expand All @@ -60,7 +60,7 @@ def test_temperatur_conversions(self):
self.assertAlmostEqual(Temperature.fahrenheit_to_kelvin(60.0),
288.7055, delta=1e-3)

def test_temperatur_mutators_accessors(self):
def test_temperature_mutators_accessors(self):
temp = Temperature()
self.assertAlmostEqual(temp.kelvin(), 0.0, delta=1e-6)

Expand All @@ -74,7 +74,7 @@ def test_temperatur_mutators_accessors(self):
self.assertAlmostEqual(temp.fahrenheit(), 30.0, delta=1e-6)
self.assertAlmostEqual(temp(), 272.0388889, delta=1e-6)

def test_temperatur_operators(self):
def test_temperature_operators(self):
temp = Temperature(20)
self.assertAlmostEqual(temp(), 20, delta=1e-6)

Expand Down

0 comments on commit c0f01b6

Please sign in to comment.