build: update default CXXFLAGS.

* Add -std=c++03 and -pedantic, and fix the resulting warnings. The
  long-long-int warning is explicitly suppressed because it's not
  trivial to workaround in a platform-independent and ISO-conformant
  way without using C++11.

* Initial support for building with -std=c++11 (experimental).

* Prefer -Og optimization level in debug builds if supported by the
  compiler.

Change-Id: I744a25c8b52842dc3ea3a733d6ab2fa66171e6f8
diff --git a/tests/face/ethernet-address.cpp b/tests/face/ethernet-address.cpp
index 92626b2..d9e1b42 100644
--- a/tests/face/ethernet-address.cpp
+++ b/tests/face/ethernet-address.cpp
@@ -57,6 +57,8 @@
                     ethernet::getBroadcastAddress());
   BOOST_CHECK_EQUAL(ethernet::Address::fromString("de:ad:be:ef:1:2"),
                     ethernet::Address(0xde, 0xad, 0xbe, 0xef, 0x01, 0x02));
+  BOOST_CHECK_EQUAL(ethernet::Address::fromString("DE:AD:BE:EF:1:2"),
+                    ethernet::Address(0xde, 0xad, 0xbe, 0xef, 0x01, 0x02));
 
   // malformed inputs
   BOOST_CHECK_EQUAL(ethernet::Address::fromString("01.23.45.67.89.ab"),
@@ -69,6 +71,8 @@
                     ethernet::Address());
   BOOST_CHECK_EQUAL(ethernet::Address::fromString("01:23:45:67:89:ab:cd"),
                     ethernet::Address());
+  BOOST_CHECK_EQUAL(ethernet::Address::fromString("01:23:45:67-89-ab"),
+                    ethernet::Address());
   BOOST_CHECK_EQUAL(ethernet::Address::fromString("qw-er-ty-12-34-56"),
                     ethernet::Address());
   BOOST_CHECK_EQUAL(ethernet::Address::fromString("this-is-not-an-ethernet-address"),
diff --git a/tests/face/ndnlp.cpp b/tests/face/ndnlp.cpp
index 7681e86..66a1c84 100644
--- a/tests/face/ndnlp.cpp
+++ b/tests/face/ndnlp.cpp
@@ -28,6 +28,8 @@
 
 #include "tests/test-common.hpp"
 
+#include <boost/scoped_array.hpp>
+
 namespace nfd {
 namespace tests {
 
@@ -161,9 +163,9 @@
   Block
   makeBlock(size_t valueLength)
   {
-    uint8_t blockValue[valueLength];
-    memset(blockValue, 0xcc, sizeof(blockValue));
-    return ndn::dataBlock(0x01, blockValue, sizeof(blockValue));
+    boost::scoped_array<uint8_t> blockValue(new uint8_t[valueLength]);
+    memset(blockValue.get(), 0xcc, valueLength);
+    return ndn::dataBlock(0x01, blockValue.get(), valueLength);
   }
 
 protected: