Kaynağa Gözat

Finalizes Electronic Key test, fixes header of several files

CapXilinx 9 yıl önce
ebeveyn
işleme
464b0b0d9c

+ 6 - 2
source/tests/cip/cipelectronickeytest.cpp

@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, Rockwell Automation, Inc.
+ * Copyright (c) 2016, Rockwell Automation, Inc.
  * All rights reserved.
  *
  ******************************************************************************/
@@ -147,11 +147,15 @@ TEST(CipElectronicKey, GetMinorRevision) {
 TEST(CipElectronicKey, ParseElectronicKeyTest) {
   /* Size of an electronic key is 1 + 1 + 8 (Segment, Key format, Key) */
   const unsigned char message[] =
-  {0x34, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x04, 0x05};
+  {0x34, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x84, 0x05};
   GetPathLogicalSegmentElectronicKeyFormat4(message, key);
 
   CHECK_EQUAL( 256, ElectronicKeyFormat4GetVendorId(key) );
   CHECK_EQUAL( 512, ElectronicKeyFormat4GetDeviceType(key) );
+  CHECK_EQUAL( 768, ElectronicKeyFormat4GetProductCode(key) );
+  CHECK_TRUE(ElectronicKeyFormat4GetMajorRevisionCompatibility(key));
+  CHECK_EQUAL(0x04, ElectronicKeyFormat4GetMajorRevision(key));
+  CHECK_EQUAL(0x05, ElectronicKeyFormat4GetMinorRevision(key));
 
   MEMCMP_EQUAL(message + 2, key, 8);
 

+ 1 - 1
source/tests/cip/cipepathtest.cpp

@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, Rockwell Automation, Inc.
+ * Copyright (c) 2016, Rockwell Automation, Inc.
  * All rights reserved.
  *
  ******************************************************************************/

+ 1 - 1
source/tests/cip/connectionmanagertest.cpp

@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, Rockwell Automation, Inc.
+ * Copyright (c) 2016, Rockwell Automation, Inc.
  * All rights reserved.
  *
  ******************************************************************************/

+ 1 - 1
source/tests/enet_encap/endianconvtest.cpp

@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, Rockwell Automation, Inc.
+ * Copyright (c) 2016, Rockwell Automation, Inc.
  * All rights reserved.
  *
  ******************************************************************************/

+ 5 - 5
source/tests/utils/randomTests.cpp

@@ -1,9 +1,9 @@
-/*
- * randomTests.cpp
+/*******************************************************************************
+ * Copyright (c) 2015, Rockwell Automation, Inc.
+ * All rights reserved.
  *
- *  Created on: Dec 16, 2013
- *      Author: mmm
- */
+ ******************************************************************************/
+
 
 #include <CppUTest/TestHarness.h>
 #include <stdint.h>

+ 5 - 6
source/tests/utils/xorshiftrandomtests.cpp

@@ -1,9 +1,8 @@
-/*
- * xorshiftrandomtests.c
+/*******************************************************************************
+ * Copyright (c) 2015, Rockwell Automation, Inc.
+ * All rights reserved.
  *
- *  Created on: Dec 1, 2013
- *      Author: mmm
- */
+ ******************************************************************************/
 
 #include <CppUTest/TestHarness.h>
 #include <stdint.h>
@@ -17,7 +16,7 @@ TEST_GROUP(XorShiftRandom)
 
 };
 
-/*This test should always return 0 as the next random number (see XorShift algorithm*/
+/* This test should always return 0 as the next random number (see XorShift algorithm) */
 TEST(XorShiftRandom, SeedZeroInitResult)
 {
 	uint32_t nResult;