Skip to content

Commit

Permalink
Fix various spelling mistakes in comments and strings in common
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Aug 1, 2018
1 parent 4bd3a2a commit a0da7b3
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ drake_cc_googletest(
],
)

# Functional test that mistyped DRAKE_ASSERTs will failt to compile.
# Functional test that mistyped DRAKE_ASSERTs will fail to compile.
sh_test(
name = "drake_assert_test_compile_variants",
size = "small",
Expand Down
2 changes: 1 addition & 1 deletion common/find_resource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ optional<string> FindSentinelDir() {
const char* const kDrakeResourceRootEnvironmentVariableName =
"DRAKE_RESOURCE_ROOT";

// Saves search directorys path in a persistent variable.
// Saves search directories path in a persistent variable.
// This function is only accessible from this file and should not
// be used outside of `GetResourceSearchPaths()` and
// `AddResourceSearchPath()`.
Expand Down
2 changes: 1 addition & 1 deletion common/proto/call_python_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def to_piece(s):
return slice(*pieces)

def make_slice_arg(*args):
"""Create a scalar or tuple for acessing objects via slices. """
"""Create a scalar or tuple for accessing objects via slices. """
out = [None] * len(args)
for i, arg in enumerate(args):
if isinstance(arg, str):
Expand Down
2 changes: 1 addition & 1 deletion common/proto/test/call_python_server_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GTEST_TEST(TestCallPython, SetVar) {
CallPython("eval", "print(example_var)");
// Print a letter.
CallPython("print", CallPython("eval", "example_var")[2]);
// Print all variables avaiable.
// Print all variables available.
CallPython("print", CallPython("locals").attr("keys")());
}

Expand Down
2 changes: 1 addition & 1 deletion common/symbolic_expression_cell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool determine_polynomial(
// Determines if pow(base, exponent) is polynomial-convertible or not. This
// function is used in constructor of ExpressionPow.
bool determine_polynomial(const Expression& base, const Expression& exponent) {
// base ^ exponent is polynomial-convertible if the followings hold:
// base ^ exponent is polynomial-convertible if the following hold:
// - base is polynomial-convertible.
// - exponent is a non-negative integer.
if (!(base.is_polynomial() && is_constant(exponent))) {
Expand Down
8 changes: 4 additions & 4 deletions common/test/copyable_unique_ptr_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ GTEST_TEST(CopyableUniquePtrTest, CopyConstructFromCopyable) {
EXPECT_EQ(u_ptr2.get(), co_ptr);
EXPECT_TRUE(is_dynamic_castable<CloneOnlyChildWithClone>(u_ptr2.get()));
// Copy constructor on copyable_unique-ptr of same specialized class, but
// contains derived clas.
// contains derived class.
cup<CloneOnly> cup_ptr2(u_ptr2);
EXPECT_EQ(u_ptr2.get(), co_ptr);
EXPECT_NE(cup_ptr2.get(), co_ptr);
Expand Down Expand Up @@ -450,7 +450,7 @@ GTEST_TEST(CopyableUniquePtrTest, CopyConstructFromUniquePtr) {
EXPECT_EQ(u_ptr2.get(), co_ptr);
EXPECT_TRUE(is_dynamic_castable<CloneOnlyChildWithClone>(u_ptr2.get()));
// Copy constructor on copyable_unique-ptr of same specialized class, but
// contains derived clas.
// contains derived class.
cup<CloneOnly> cup_ptr2(u_ptr2);
EXPECT_EQ(u_ptr2.get(), co_ptr);
EXPECT_NE(cup_ptr2.get(), co_ptr);
Expand Down Expand Up @@ -490,7 +490,7 @@ GTEST_TEST(CopyableUniquePtrTest, MoveConstructFromCopyable) {
EXPECT_EQ(u_ptr2.get(), co_ptr);
EXPECT_TRUE(is_dynamic_castable<CloneOnlyChildWithClone>(u_ptr2.get()));
// Copy constructor on copyable_unique-ptr of same specialized class, but
// contains derived clas.
// contains derived class.
cup<CloneOnly> cup_ptr2(move(u_ptr2));
EXPECT_EQ(u_ptr2.get(), nullptr);
EXPECT_EQ(cup_ptr2.get(), co_ptr);
Expand Down Expand Up @@ -525,7 +525,7 @@ GTEST_TEST(CopyableUniquePtrTest, MoveConstructFromUnique) {
EXPECT_EQ(u_ptr2.get(), co_ptr);
EXPECT_TRUE(is_dynamic_castable<CloneOnlyChildWithClone>(u_ptr2.get()));
// Copy constructor on copyable_unique-ptr of same specialized class, but
// contains derived clas.
// contains derived class.
cup<CloneOnly> cup_ptr2(move(u_ptr2));
EXPECT_EQ(u_ptr2.get(), nullptr);
EXPECT_EQ(cup_ptr2.get(), co_ptr);
Expand Down
2 changes: 1 addition & 1 deletion common/test/cpplint_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def worker_summarize_cpplint(cmdline_and_files, args):

def multiprocess_cpplint(cmdline, files, args):
"""Given a cpplint subprocess command line (just the program and arguments),
separate list of files, and number of processess (None for "all CPUs"), run
separate list of files, and number of processes (None for "all CPUs"), run
cpplint, display a progress bar, warning summary, and return a shell
exitcode (0 on success, 1 on failure).
"""
Expand Down
2 changes: 1 addition & 1 deletion common/test/find_loaded_library_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace {
GTEST_TEST(FindLibraryTest, Library) {
// See above.
lib_is_real_dummy_function();
// Test wether or not `LoadedLibraryPath()` can find the path to a library
// Test whether or not `LoadedLibraryPath()` can find the path to a library
// loaded by the process.
optional<string> library_path = LoadedLibraryPath("lib_is_real.so");
ASSERT_TRUE(library_path);
Expand Down
6 changes: 3 additions & 3 deletions common/test/symbolic_expansion_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SymbolicExpansionTest : public ::testing::Test {
};

TEST_F(SymbolicExpansionTest, ExpressionAlreadyExpandedPolynomial) {
// The followings are all already expanded.
// The following are all already expanded.
EXPECT_TRUE(CheckAlreadyExpanded(0));
EXPECT_TRUE(CheckAlreadyExpanded(1));
EXPECT_TRUE(CheckAlreadyExpanded(-1));
Expand All @@ -82,7 +82,7 @@ TEST_F(SymbolicExpansionTest, ExpressionAlreadyExpandedPolynomial) {
}

TEST_F(SymbolicExpansionTest, ExpressionAlreadyExpandedPow) {
// The followings are all already expanded.
// The following are all already expanded.
EXPECT_TRUE(CheckAlreadyExpanded(pow(x_, y_))); // x^y
EXPECT_TRUE(CheckAlreadyExpanded(pow(x_, -1))); // x^(-1)
EXPECT_TRUE(CheckAlreadyExpanded(pow(x_, -1))); // x^(-1)
Expand All @@ -94,7 +94,7 @@ TEST_F(SymbolicExpansionTest, ExpressionAlreadyExpandedPow) {

TEST_F(SymbolicExpansionTest, ExpressionExpansion) {
// test_exprs includes pairs of expression `e` and its expected expansion
// `expected`. For each pair (e, expected), we check the followings:
// `expected`. For each pair (e, expected), we check the following:
// 1. e.Expand() is structurally equal to expected.
// 2. Evaluate e and e.Expand() under multiple environments to check the
// correctness of expansions.
Expand Down
4 changes: 2 additions & 2 deletions common/test/symbolic_expression_transform_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SymbolicExpressionTransformationTest : public ::testing::Test {
Eigen::Transform<double, 3, Eigen::Projective, Eigen::DontAlign> projective_;
};

// Checks if `lhs.cast<Expresion>() * rhs` and `(lhs * rhs).cast<Expresion>()`
// Checks if `lhs.cast<Expression>() * rhs` and `(lhs * rhs).cast<Expression>()`
// produce almost identical output. Also checks the symmetric case. See the
// following commutative diagram.
// * rhs
Expand All @@ -62,7 +62,7 @@ class SymbolicExpressionTransformationTest : public ::testing::Test {
// || ||
// || * rhs ||
// \/ ? \/
// lhs.cast<Expresion>() * rhs == (lhs * rhs).cast<Expresion>()
// lhs.cast<Expression>() * rhs == (lhs * rhs).cast<Expression>()
//
// The exactness is not guaranteed due to the non-associativity of
// floating-point arithmetic (+, *).
Expand Down
2 changes: 1 addition & 1 deletion common/test_utilities/eigen_matrix_compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ::testing::AssertionResult CompareMatrices(
// Check for case where one value is NaN and the other is not
if ((isnan(m1(ii, jj)) && !isnan(m2(ii, jj))) ||
(!isnan(m1(ii, jj)) && isnan(m2(ii, jj)))) {
return ::testing::AssertionFailure() << "NaN missmatch at (" << ii
return ::testing::AssertionFailure() << "NaN mismatch at (" << ii
<< ", " << jj << "):\nm1 =\n"
<< m1 << "\nm2 =\n"
<< m2;
Expand Down

0 comments on commit a0da7b3

Please sign in to comment.