stringpiece_test.cc
imports tsl/platform/stringpiece.himports xla/tsl/platform/test.h
SHA-25602afa4590d58a57be60d4cf63ec55c9b37b921e75dce1c77c428a8898d03987c
MaleculeMd₂(In₂Pa)
Evidence
1/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is …
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include "tsl/platform/stringpiece.h"
17
18#include <unordered_map>
19
20#include "xla/tsl/platform/test.h"
21
22namespace tsl {
⋯4 lines
27 const char* hello = "hello";
28 absl::string_view s20(hello);
29 EXPECT_TRUE(s20.data() == hello);
30 EXPECT_EQ(5, s20.size());
31
32 // const char* with size.
33 absl::string_view s21(hello, 4);
34 EXPECT_TRUE(s21.data() == hello);
35 E …