def test_function_memory_read
    expected = "; Function Attrs: memory(read)\ndeclare void @fun() #0\n"
    with_function [], LLVM.Void do |fun|
      fun.add_attribute(attr_memory(21))
      assert_equal(expected, fun.to_s)