Skip to content

Commit

Permalink
Fri Jun 7 22:30:25 UTC 2013 schmitzj <[email protected]>
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtheschmitzer committed Jun 7, 2013
1 parent fbc7c1d commit 3168c01
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
10 changes: 9 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
Mon Jun 6 22:30:25 UTC 2013 wilsond <[email protected]>
Fri Jun 7 22:30:25 UTC 2013 schmitzj <[email protected]>
* setup.sh:
Use a more likely default MPC_ROOT
Don't force a default BOOST_CFG

* src/Tests/testReplaceField.cpp:
Replace FieldIdentityCPtr with FieldIdentity references.

Thu Jun 6 22:30:25 UTC 2013 wilsond <[email protected]>
* src\Application\DecoderConfiguration.h:
* src\Codecs\DataSource.h:
* src\Codecs\FieldInstruction.h:
Expand Down
7 changes: 1 addition & 6 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export QUICKFAST_ROOT=`readlink -f $SOURCE_DIR`

if test "$MPC_ROOT" = ""
then
export MPC_ROOT=~/MPC
export MPC_ROOT=$ACE_ROOT/MPC
fi

if test "$BOOST_ROOT" = ""
Expand All @@ -22,11 +22,6 @@ then
export BOOST_ROOT_LIB=$BOOST_ROOT/lib
fi

if test "$BOOST_CFG" = ""
then
export BOOST_CFG=-gcc41-mt
fi

if test "$BOOST_VERSION" = ""
then
export BOOST_VERSION=boost-1_38
Expand Down
12 changes: 5 additions & 7 deletions src/Tests/testReplaceField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,28 @@ BOOST_AUTO_TEST_CASE(TestReplaceField)

Messages::Message msg(templateRegistry->maxFieldCount());

Messages::FieldIdentityCPtr identity_int32_nop =
new Messages::FieldIdentity("int32_nop");
Messages::FieldIdentity identity_int32_nop("int32_nop");
Messages::FieldSet fields(templateRegistry->maxFieldCount());
// Add the field
fields.addField(identity_int32_nop, Messages::FieldInt32::create(17));

int64 value;
fields.getSignedInteger(*identity_int32_nop, ValueType::INT32, value);
fields.getSignedInteger(identity_int32_nop, ValueType::INT32, value);
BOOST_CHECK_EQUAL(17, value);

// Replace the field
bool result;
result = fields.replaceField(identity_int32_nop,
Messages::FieldInt32::create(429));
fields.getSignedInteger(*identity_int32_nop, ValueType::INT32, value);
fields.getSignedInteger(identity_int32_nop, ValueType::INT32, value);
BOOST_CHECK(result);
BOOST_CHECK_EQUAL(429, value);

// Replace field not present
Messages::FieldIdentityCPtr identity_uint64_nop =
new Messages::FieldIdentity("uint64_nop");
Messages::FieldIdentity identity_uint64_nop("uint64_nop");
result = fields.replaceField(identity_uint64_nop,
Messages::FieldInt32::create(333));
BOOST_CHECK(!result);
BOOST_CHECK(!fields.isPresent(*identity_uint64_nop));
BOOST_CHECK(!fields.isPresent(identity_uint64_nop));
}

0 comments on commit 3168c01

Please sign in to comment.