| Index: third_party/grpc/src/php/tests/unit_tests/ServerTest.php
|
| diff --git a/third_party/WebKit/public/platform/WebDoublePoint.h b/third_party/grpc/src/php/tests/unit_tests/ServerTest.php
|
| similarity index 65%
|
| copy from third_party/WebKit/public/platform/WebDoublePoint.h
|
| copy to third_party/grpc/src/php/tests/unit_tests/ServerTest.php
|
| index d666e13379a0d23e55f6525c7c49c6c271ace9f8..cde6a9a8f7d4d168302622fc3e0c1ceaaff7f398 100644
|
| --- a/third_party/WebKit/public/platform/WebDoublePoint.h
|
| +++ b/third_party/grpc/src/php/tests/unit_tests/ServerTest.php
|
| @@ -1,5 +1,8 @@
|
| +<?php
|
| /*
|
| - * Copyright 2014 Google Inc. All rights reserved.
|
| + *
|
| + * Copyright 2015-2016, Google Inc.
|
| + * All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -26,60 +29,43 @@
|
| * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| + *
|
| */
|
|
|
| -#ifndef WebDoublePoint_h
|
| -#define WebDoublePoint_h
|
| -
|
| -#include "WebCommon.h"
|
| -
|
| -#if INSIDE_BLINK
|
| -#include "platform/geometry/DoublePoint.h"
|
| -#endif
|
| -
|
| -namespace blink {
|
| -
|
| -struct WebDoublePoint {
|
| - double x;
|
| - double y;
|
| -
|
| - WebDoublePoint()
|
| - : x(0.0)
|
| - , y(0.0)
|
| +class ServerTest extends PHPUnit_Framework_TestCase
|
| +{
|
| + public function setUp()
|
| {
|
| }
|
|
|
| - WebDoublePoint(double x, double y)
|
| - : x(x)
|
| - , y(y)
|
| + public function tearDown()
|
| {
|
| }
|
|
|
| -#if INSIDE_BLINK
|
| - WebDoublePoint(const DoublePoint& p)
|
| - : x(p.x())
|
| - , y(p.y())
|
| + /**
|
| + * @expectedException InvalidArgumentException
|
| + */
|
| + public function testInvalidConstructor()
|
| {
|
| + $server = new Grpc\Server('invalid_host');
|
| }
|
|
|
| - operator DoublePoint() const
|
| + /**
|
| + * @expectedException InvalidArgumentException
|
| + */
|
| + public function testInvalidAddHttp2Port()
|
| {
|
| - return DoublePoint(x, y);
|
| + $this->server = new Grpc\Server([]);
|
| + $this->port = $this->server->addHttp2Port(['0.0.0.0:0']);
|
| }
|
| -#endif
|
|
|
| -};
|
| -
|
| -inline bool operator==(const WebDoublePoint& a, const WebDoublePoint& b)
|
| -{
|
| - return a.x == b.x && a.y == b.y;
|
| -}
|
| -
|
| -inline bool operator!=(const WebDoublePoint& a, const WebDoublePoint& b)
|
| -{
|
| - return !(a == b);
|
| -}
|
| -
|
| -} // namespace blink
|
| + /**
|
| + * @expectedException InvalidArgumentException
|
| + */
|
| + public function testInvalidAddSecureHttp2Port()
|
| + {
|
| + $this->server = new Grpc\Server([]);
|
| + $this->port = $this->server->addSecureHttp2Port(['0.0.0.0:0']);
|
| + }
|
|
|
| -#endif
|
| +}
|
|
|