Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4253824
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:59:53+00:00 2026-05-21T04:59:53+00:00

I have asked a related question , but I did not get a satisfactory

  • 0

I have asked a related question, but I did not get a satisfactory answer. So, perhaps I should ask it a different way.

How do large-scale C projects, like Perl or Ruby or even the Linux kernel, handle unit-testings? Or even in any functional language?

I am familiar with Dependency Injection and Abstract Factory for testings in OOP, but I don’t see a scalable and manageable equivalence in non OOP. In C or Haskell, for example, there would be layers over layers of functions, higher ones implicitly calling the lower ones. How do I find seams to test just an unit of code instead of all its dependencies?

One way to avoid the need for seams all together is to keep the depths of call-dependency graph very low. Code horizontally rather than vertically, so to speak. Keep as much of the application logic as possible in the “leaf” functions; and make sure the “node” functions do no work other than plumbing the data to other node/leaf functions. Then, test only the “leaf” functions; leave the “node” functions out to integration tests. Is that approach effective?

The largest software today are still written in procedural languages. There must be some methodologies being employed that work. Could someone with experience with large-scale software in procedural languages with good unit-testings comment?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:59:54+00:00Added an answer on May 21, 2026 at 4:59 am

    Functional languages have other constructs (than objects) for modularity, such as ML functors. “Dependency injection” is basically a glorified name for “abstracting over things” and has been used for ages in functional languages.

    Testing, in all paradigms, should follow the specification boundaries. If you have an idea what a given piece of code (function, method, object…) is supposed to do, you should test against this specification. For leaf functions, this will be unit testing, for “node” function this can be considered “integration testing” if you like, but it’s really the same activity.

    I think you will find that the same methodologies essentially applies to functional programming, with essentially the same results; in particular, (re)designing code to be easy to test also improves its modularity and maintainability.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asked this before but I didn't get the question right so the
This is closely related to anothewr question I have asked but since this is
I asked a related question about findbugs, but let's ask a more general question.
This question is related to this one but I think should be asked separately.
I originally asked a related question here , but didn't really seem to get
I have asked a few questions related to this, but from different angles. I
This is a related to a previous question I have asked here, see the
This question is related to another question I asked Basically, I have 2 horizontally
I have asked a similar question before, but I didn't have a firm grasp
So similar questions have been asked with not much of an answer.... I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.