[libc][NFC] Remove extra ; in exhaustive_test.h. (#124216)
[llvm-project.git] / libcxx / test / std / containers / container.adaptors / priority.queue / priqueue.members / top.pass.cpp
blob72153bc532f7ffe04a6e23e013130e5b3b35a227
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-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <queue>
11 // priority_queue();
13 // const_reference top() const;
15 #include <queue>
16 #include <cassert>
18 #include "test_macros.h"
20 int main(int, char**)
22 std::priority_queue<int> q;
23 q.push(1);
24 assert(q.top() == 1);
25 q.push(3);
26 assert(q.top() == 3);
27 q.push(2);
28 assert(q.top() == 3);
30 return 0;