brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 09794a1 Raw
41 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// <random>10 11// template<class _IntType = int>12// class uniform_int_distribution13 14// bool operator=(const uniform_int_distribution& x,15//                const uniform_int_distribution& y);16// bool operator!(const uniform_int_distribution& x,17//                const uniform_int_distribution& y);18 19#include <random>20#include <cassert>21 22#include "test_macros.h"23 24int main(int, char**)25{26    {27        typedef std::uniform_int_distribution<> D;28        D d1(3, 8);29        D d2(3, 8);30        assert(d1 == d2);31    }32    {33        typedef std::uniform_int_distribution<> D;34        D d1(3, 8);35        D d2(3, 9);36        assert(d1 != d2);37    }38 39  return 0;40}41