defmodule LogicalOperatorsTest do use ExUnit.Case, async: true doctest LogicalOperators describe "LogicalOperators.l_true/2" do test "returns the first argument" do assert LogicalOperators.l_true(1, 2) == 1 end end describe "LogicalOperators.l_false/2" do test "returns the second argument" do assert LogicalOperators.l_false(1, 2) == 2 end end describe "LogicalOperators.l_not/1" do test "NOT TRUE is FALSE" do assert LogicalOperators.l_not(true) == false end test "NOT FALSE is TRUE" do assert LogicalOperators.l_not(false) == true end end describe "LogicalOperators.l_and/2" do test "TRUE AND TRUE is TRUE" do assert LogicalOperators.l_and(true, true) == true end test "TRUE AND FALSE is FALSE" do assert LogicalOperators.l_and(true, false) == false end test "FALSE AND TRUE is FALSE" do assert LogicalOperators.l_and(false, true) == false end test "FALSE AND FALSE is FALSE" do assert LogicalOperators.l_and(false, false) == false end end describe "LogicalOperators.l_or/2" do test "TRUE AND TRUE is TRUE" do assert LogicalOperators.l_or(true, true) == true end test "TRUE AND FALSE is TRUE" do assert LogicalOperators.l_or(true, false) == true end test "FALSE AND TRUE is TRUE" do assert LogicalOperators.l_or(false, true) == true end test "FALSE AND FALSE is FALSE" do assert LogicalOperators.l_or(false, false) == false end end describe "LogicalOperators.l_xor/2" do test "TRUE AND TRUE is FALSE" do assert LogicalOperators.l_xor(true, true) == false end test "TRUE AND FALSE is TRUE" do assert LogicalOperators.l_xor(true, false) == true end test "FALSE AND TRUE is TRUE" do assert LogicalOperators.l_xor(false, true) == true end test "FALSE AND FALSE is FALSE" do assert LogicalOperators.l_xor(false, false) == false end end end