Index: uspace/lib/cpp/Makefile
===================================================================
--- uspace/lib/cpp/Makefile	(revision 91ac0bb3e268723cb3837110b949520a699784e6)
+++ uspace/lib/cpp/Makefile	(revision 496025422a5094d2ef79f0488ae2caf8015aaf02)
@@ -65,4 +65,5 @@
 	src/__bits/test/mock.cpp \
 	src/__bits/test/numeric.cpp \
+	src/__bits/test/ratio.cpp \
 	src/__bits/test/set.cpp \
 	src/__bits/test/string.cpp \
Index: uspace/lib/cpp/include/__bits/test/tests.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/test/tests.hpp	(revision 91ac0bb3e268723cb3837110b949520a699784e6)
+++ uspace/lib/cpp/include/__bits/test/tests.hpp	(revision 496025422a5094d2ef79f0488ae2caf8015aaf02)
@@ -267,4 +267,11 @@
             void test_modifiers();
     };
+
+    class ratio_test: public test_suite
+    {
+        public:
+            bool run(bool) override;
+            const char* name() override;
+    };
 }
 
Index: uspace/lib/cpp/src/__bits/test/ratio.cpp
===================================================================
--- uspace/lib/cpp/src/__bits/test/ratio.cpp	(revision 496025422a5094d2ef79f0488ae2caf8015aaf02)
+++ uspace/lib/cpp/src/__bits/test/ratio.cpp	(revision 496025422a5094d2ef79f0488ae2caf8015aaf02)
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2018 Jaroslav Jindrak
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <__bits/test/tests.hpp>
+#include <initializer_list>
+#include <ratio>
+#include <utility>
+
+namespace std::test
+{
+    bool ratio_test::run(bool report)
+    {
+        report_ = report;
+        start();
+
+        test_eq(
+            "ratio_add pt1",
+            std::ratio_add<std::ratio<2, 3>, std::ratio<1, 6>>::num,
+            5
+        );
+        test_eq(
+            "ratio_add pt2",
+            std::ratio_add<std::ratio<2, 3>, std::ratio<1, 6>>::den,
+            6
+        );
+
+        test_eq(
+            "ratio_subtract pt1",
+            std::ratio_subtract<std::ratio<2, 3>, std::ratio<1, 6>>::num,
+            1
+        );
+        test_eq(
+            "ratio_subtract pt2",
+            std::ratio_subtract<std::ratio<2, 3>, std::ratio<1, 6>>::den,
+            2
+        );
+
+        test_eq(
+            "ratio_multiply pt1",
+            std::ratio_multiply<std::ratio<2, 3>, std::ratio<1, 6>>::num,
+            1
+        );
+        test_eq(
+            "ratio_multiply pt2",
+            std::ratio_multiply<std::ratio<2, 3>, std::ratio<1, 6>>::den,
+            9
+        );
+
+        test_eq(
+            "ratio_divide pt1",
+            std::ratio_divide<std::ratio<2, 3>, std::ratio<1, 6>>::num,
+            4
+        );
+        test_eq(
+            "ratio_divide pt2",
+            std::ratio_divide<std::ratio<2, 3>, std::ratio<1, 6>>::den,
+            1
+        );
+
+        test_eq(
+            "ratio_equal", std::ratio_equal_v<std::ratio<2, 3>, std::ratio<6, 9>>, true
+        );
+
+        test_eq(
+            "ratio_not_equal", std::ratio_not_equal_v<std::ratio<2, 3>, std::ratio<5, 9>>, true
+        );
+
+        test_eq(
+            "ratio_less", std::ratio_less_v<std::ratio<2, 3>, std::ratio<5, 6>>, true
+        );
+
+        test_eq(
+            "ratio_less_equal pt1", std::ratio_less_equal_v<std::ratio<2, 3>, std::ratio<5, 6>>, true
+        );
+
+        test_eq(
+            "ratio_less_equal pt2", std::ratio_less_equal_v<std::ratio<2, 3>, std::ratio<2, 3>>, true
+        );
+
+        test_eq(
+            "ratio_greater", std::ratio_greater_v<std::ratio<2, 3>, std::ratio<2, 6>>, true
+        );
+
+        test_eq(
+            "ratio_greater_equal pt1", std::ratio_greater_equal_v<std::ratio<2, 3>, std::ratio<2, 6>>, true
+        );
+
+        test_eq(
+            "ratio_greater_equal pt2", std::ratio_greater_equal_v<std::ratio<2, 3>, std::ratio<2, 3>>, true
+        );
+
+        return end();
+    }
+
+    const char* ratio_test::name()
+    {
+        return "ratio";
+    }
+}
