1 //===- llvm/unittest/Support/StreamingMemoryObject.cpp - unit tests -------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/Support/StreamingMemoryObject.h"
11 #include "gtest/gtest.h"
17 class NullDataStreamer : public DataStreamer {
18 size_t GetBytes(unsigned char *buf, size_t len) override {
25 TEST(StreamingMemoryObject, Test) {
26 auto *DS = new NullDataStreamer();
27 StreamingMemoryObject O(DS);
28 EXPECT_TRUE(O.isValidAddress(32 * 1024));