[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is it possible to test local funtion with lunit?
- From: Coda Highland <chighland@...>
- Date: Wed, 30 Jul 2014 18:47:28 -0700
On Wed, Jul 30, 2014 at 6:44 PM, albert_200200 <albert_200200@126.com> wrote:
> foo.lua
> ---------------------------------------
> local M = {}
> local function add_internal(a, b)
> end
>
> function M.add(a, b)
> add_internal(a, b)
> end
> return M
>
>
> test.lua
> ---------------------------------------
> require("foo.lua")
> Is it possible in test.lua to test add_internal of foo.lua?
No. That's sort of the definition of "local".
/s/ Adam