2017-10-27 23:10:06 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2016-03-24 01:20:41 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include <limits>
|
|
|
|
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
|
|
|
#include "mozilla/ArrayView.h"
|
|
|
|
|
|
|
|
using namespace mozilla::gfx;
|
|
|
|
|
2019-04-05 21:42:17 +00:00
|
|
|
TEST(Gfx, ArrayView)
|
|
|
|
{
|
2016-03-24 01:20:41 +00:00
|
|
|
nsTArray<int> p = {5, 6};
|
|
|
|
ArrayView<int> pv(p);
|
|
|
|
ASSERT_EQ(pv[1], 6);
|
|
|
|
ASSERT_EQ(*pv.Data(), 5);
|
|
|
|
}
|